The 6.0.0 release of Angular is here! This is a major release focused less on the underlying framework, and more on the toolchain and on making it easier to move quickly with Angular in the future.
As a part of this release, we are synchronizing the major versions going forward for the framework packages (@angular/core, @angular/common, @angular/compiler, etc), the Angular CLI, and Angular Material + CDK. All are releasing as 6.0.0 today. We made this change to clarify cross-compatibility. The minor and patch releases for these projects will be issued based on the project’s needs.
ng update <package> is a new CLI command that analyzes your package.jsonand uses its knowledge of Angular to recommend updates to your application. To see it in action, check out our update guide.
Not only will ng update help you adopt the right version of dependencies, and keep your dependencies in sync, but 3rd parties can provide update scripts using schematics. If one of your dependencies provides an ng updateschematic, they can automatically update your code when they need to make breaking changes!
ng update will not replace your package manager, but uses npm or yarn under the hood to manage dependencies. In addition to updating dependencies and peer dependencies, ng update will apply needed transforms to your project.
For example, the command ng update @angular/core will update all of the Angular framework packages as well as RxJS and TypeScript, and will run any schematics available on these packages to keep you up to date. As part of this one command, we’ll automatically install rxjs-compat into your application to make the adoption of RxJS v6 smoother.
We expect to see many more libraries and packages add ng updateschematics over the coming months, and have already heard from enterprise component library teams that are planning to use ng update to push through important changes in an automated way to save their developers time.
Another new CLI command ng add <package> makes adding new capabilities to your project easy. ng add will use your package manager to download new dependencies and invoke an installation script (implemented as a schematic) which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code.
Try out some of the following on your fresh ng new application:
ng add @angular/pwa — Turn your application into a PWA by adding an app manifest and service worker
ng add @ng-bootstrap/schematics — Add ng-bootstrap to your application
ng add @angular/material — Install and setup Angular Material and theming and register new starter components into ng generate
ng add @clr/angular@next— Install and setup Clarity from VMWare
ng add @angular/elements — Add the needed document-register-element.js polyfill and dependencies for Angular Elements (see below)
Because ng add is built on top of schematics and the npm registry, our hope is that libraries and the community will help us build a rich ecosystem of ng add supporting packages.
The first release of Angular Elements is focused on allowing you to bootstrap Angular components within an existing Angular application by registering them as Custom Elements. We use this extensively in angular.io as part of our content management system to allow dynamic bootstrapping of capabilities via embedded HTML. This replaces the need to manually bootstrap Angular components found in static html content.
The biggest addition is the new tree component for displaying hierarchical data. Following patterns from the data-table component, the CDK houses the core tree directives, with Angular Material offering the same experience with Material Design styles on top. We recently gave a talk about the component, so check that out for more information (video, slides). These new tree components come in both styled (Material’s mat-tree) and unstyled versions (CDK’s cdk-tree).
Alongside the tree, we also have new badge and bottom-sheet components. Badges help display small bits of helpful information, such as unread item counts. Bottom-sheets are a special type of mobile-centric dialogs that come up from the bottom of the viewport, commonly used to present a list of options following an action.
The @angular/cdk/overlay package is one of the most powerful pieces of infrastructure in the CDK today. With the release of v6, this package now includes new positioning logic that helps make pop-ups that intelligently remain on-screen in all situations.
Angular Material Starter Components
ng generate for adding a dashboard to your project
Once you have run ng add @angular/material to add material to an existing application, you will also be able to generate 3 new starter components.
—
Material Sidenav
You can now generate a starter component including a toolbar with the app name and the side navigation. This component is responsive based on breakpoints.
Run:
ng generate @angular/material:material-nav --name=my-nav
This will create this starter component:
material-nav
—
Material Dashboard
You can now generate a starter dashboard component containing a dynamic grid list of cards.
Run:
ng generate @angular/material:material-dashboard --name=my-dashboard
This will create this starter component:
material-dashboard
—
Material Data Table
You can generate a starter data table component that is pre-configured with a datasource for sorting and pagination.
Run:
ng generate @angular/material:material-table --name=my-table
CLI v6 now has support for workspaces containing multiple projects, such as multiple applications or libraries. CLI projects will now use angular.jsoninstead of .angular-cli.json for build and project configuration.
Each CLI workspace has projects, each project has targets, and each target can have configurations.
To make your applications smaller, we’ve moved from modules referencing services to services referencing modules. This allows us to only bundle services into your code base in modules where they are injected.
We’ve updated our implementation of Animations to no longer need the web animations polyfill. This means that you can remove this polyfill from your application and save approximately 47KB of bundle size, while increasing animations performance in Safari at the same time.
RxJS v6
Angular has been updated to use v6 of RxJS. RxJS is an independent project that released v6 several weeks ago. RxJS v6 brings with it several major changes, along with a backwards compatibility package rxjs-compat that will keep your applications working.
RxJS has been rearranged to make it more tree-shakable, ensuring that only the pieces of RxJS that you use are included in your production bundles.
We are expanding our Long Term Support to all major releases.
Previously we announced that only v4 and v6 would be LTS releases but in order to make updating from one major to the next easier, and give bigger projects more time to plan updates, we have decided to extend the long-term support to all major releases starting with v4.
Each major release will be supported for 18 months with around 6 months of active development followed by 12 months of critical bugfixes and security patches.
Visit update.angular.io for information and guidance on updating your application.
https://update.angular.io
The update generally follows 3 steps, and will take advantage of the new ng update tool.
Update @angular/cli
Update your Angular framework packages
Update other dependencies
Making it easy for developers to stay up to date with the latest releases is extremely important to us, so let us know what you think about this release in the comments!
What about Ivy?
At ng-conf we mentioned a new initiative called Ivy — our next generation rendering pipeline. Ivy is currently under active development and is not part of the 6.0 release. We will announce an opt-in preview of Ivy as soon as it is ready in the coming months. Keep an eye on this blog for the latest information.
If you’re like most Internet users, you download various types of files now and then. You either download these files with your web browser or some download manager software. Have you ever considered downloading files using the command prompt i.e. CMD? If not, we recommend you to try it. It’s quite interesting apart from being very useful as well. In this article, we’ll show you how to download a file using command prompt aka CMD. How to download a file using command prompt? There are several useful commands for the Command Prompt and one of them is bitsadmin . Though bitsadmin has several uses, here we shall limit this article to its role in downloading files only. If you want to read the details about bitsadmin syntax, continue reading this section. Otherwise, you can scroll down to the next section – Downloading a file . The syntax of bitsadmin is : BITSADMIN [/RAWRETURN] [/WRAP | /NOWRAP] command As you know, the parts of the syntax inside ...
Technology moves at breakneck speed, and we now have more power in our pockets than we had in our homes in the 1990s. Artificial intelligence (AI) has been a fascinating concept of science fiction for decades, but many researchers think we’re finally getting close to making AI a reality. NPR notes that in the last few years, scientists have made breakthroughs in “machine learning,” using neural networks, which mimic the processes of real neurons. This is a type of “deep learning” that allows machines to process information for themselves on a very sophisticated level, allowing them to perform complex functions like facial recognition. Big data is speeding up the AI development process, and we may be seeing more integration of AI technology in our everyday lives relatively soon. While much of this technology is still fairly rudimentary at the moment, we can expect sophisticated AI to one day significantly impact our everyday lives. Here are 6 ways AI might affect us in the ...
In this tutorial we'll go through an example of how to build a simple user registration, login and user management (CRUD) application with Angular 9. The project is available on GitHub at https://github.com/cornflourblue/angular-9-registration-login-example . The Angular CLI was used to generate the base project structure with the ng new <project name> command, the CLI is also used to build and serve the application. For more info about the Angular CLI see https://angular.io/cli . Styling of the example app is all done with Bootstrap 4.4 CSS, for more info about Bootstrap see https://getbootstrap.com/docs/4.4/getting-started/introduction/ . Here it is in action: (See on StackBlitz at https://stackblitz.com/edit/angular-9-registration-login-example ) Running the Angular 9 Login Tutorial Example Locally Install NodeJS and NPM from https://nodejs.org . Download or clone the Angular project source code from https:...
After reading this blog i very strong in this topics and this blog really helpful to all. AngularJS 5 Online Training India
ReplyDelete