what is angular 8
Angular is the most popular developing platform for client-side (front-end) mobile and desktop web applications.web applications are simply dynamic websites
- Time-to-time (eg. news update webs applications)
- Location-to-location (eg. Weather-report web applications)
- User-to-user (eg. Gmail, Facebook-type applications)
What’s new in Angular v8?
As planned, there were no shocks: the update of the structure and CLI can be done by working ng update and the new features are a welcome increase in line with the saw “evolution instead of revolution”.In this post, I will cover the most relevant new features of Angular 8 and the identical Angular CLI 8. The examples I will use can be located on GitHub.
First glimpse of Ivy
The next important news the Angular world is helping is Ivy, which is the latest Angular compiler as well as a new rendering pipeline. Ivy has the potential to create considerably fewer bundles, it executes incremental compiling easier and is also the source for future changes in the Angular field.
After many underlying components of Angular have been changed here, the Angular team must pay specific notice to unity with preceding Angular versions: after changing to Ivy, current applications should work just as previously. In the best example, noticeably fewer bundles should satisfy. That is not selfless, as more than 600 applications at Google are authorized based on Angular – the real number, according to reports, is much higher
Update Angular CLI previous versions to Angular CLI 8
we are defining how to update your previous version of Angular in the latest version.you can quickly update it to Angular 8 by doing the following things:
Step 1: Initial, review your current version of Angular CLI by applying the following command.
ng -version
Step 2: Run the next command to uninstall your older version of Angular.
For Windows
npm uninstall -g angular-cli
For Mac
sudo npm uninstall -g angular-cli
Step 3: Currently you have got to verify and clear the cache by using the following commands.
npm cache verify npm cache clean
Step 4: Install the latest Angular CLI (Angular 8) by using the following command. npm install -g @angular/cli@latest
Step 5: Angular8 CLI is installed. You can verify it by following the command.
ng --version
Update Angular Packages
If you have got generated your project in any other Angular version then move inside that folder and use the following command to update that package.
ng update @angular/core
1). Differential loading-
Differential loading is a new feature that allows you to use version 8 of the Angular CLI to generate 2 different production packages of your app. Attributes on the <script> tag in your index.html file made the browser offer the various proper bundle; new browsers will request a bundle that does ES2015 JavaScript syntax and will be significantly smaller than the legacy package that applies ES5 syntax to keep support for earlier browsers. Differential loading is allowed by default for new apps generated with version 8 of the CLI, but you can simply allow this feature on your current apps by updating to Angular 8, joining a browser list shapefile, and setting the “target” option in your tsconfig.json file to “es2015”. The result? Your users with new browsers get a smaller bundle that loads faster (and puts a bigger smirk on their profile).
2). Current lazy loading syntax
Lazy loading feature modules has been a most useful application in Angular for quite a while. That hasn’t improved in version 8, but in the position of the exclusive syntax to allow lazy loading, the framework has used the more traditional dynamic import syntax applied extensively in client-side web development. The new syntax relies less on parsing class names from strings and allows editors and IDEs to verify that you’re importing the right things.
3. Create web workers with the CLI
Angular 8 makes it easier than ever to use web workers to handle CPU-intensive tasks in your apps. Version 8 of the Angular CLI includes a new schematic used with the ng generate the command to generate and update the required files in your project to add a modern web worker. The new and refreshed files include a basic template for your new web worker so you can fret short about boilerplate syntax and more immediate focus on writing the code you want to run on a background thread.
4. Builder and workspace APIs
Although all apparently not a feature you’ll utilize on each project, Angular 8 also introduces different APIs that enable you to generate a custom build and deployment commands applying hooks into the simple ng build, ng test, and ng run commands. There are also unique APIs that enable you to start and work with the workspace established in your angular.json file, which should decrease the amount of manual administration required to correctly configure your project.
No comments:
Post a Comment