Manually

We will begin by installing all required libraries. As of Angular 5, the major version of Angular Material should match the version of your Angular installation and with Angular 6, the versions should be synced:

  1. In the terminal, execute  npm install @angular/material @angular/cdk @angular/animations hammerjs
  2. Observe package.json versions:
package.json
"dependencies": {
"@angular/animations": "6.0.0",
"@angular/cdk": "6.0.0",
"@angular/material": "6.0.0",
"hammerjs": "^2.0.8",
...

In this case, all libraries have the same major and minor version at 5.0. If your major and minor versions don't match, you can rerun the npm install command to install a specific version or choose to upgrade your version of Angular by appending the semver version of the package to the install command:

$ npm install @angular/[email protected] @angular/[email protected] @angular/[email protected]
If you are working on a Bash-like shell, you can save some typing by using the bracket syntax to avoid having to repeat portions of the command, like npm install @angular/{material,cdk,animations}@6.0.0.

If you need to update your version of Angular, refer to the Updating Angular section in Chapter 4, Staying Up to Date with Angular Updates.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.51.145