Creating a client application using Nx

Now, let's create another client application for admin users using the Angular CLI command:

> ng g application es-admin --prefix es --routing
? In which directory should the application be generated?
? Which stylesheet format would you like to use? SCSS [
http://sass-lang.com ]

? Which Unit Test Runner would you like to use for the application? Jest
[https://jestjs.io ]

? Which E2E Test Runner would you like to use for the application? Cypress
[https://www.cypress.io ]

You should see that a new Angular app was created in the apps folder, along with the e2e app for it. Let's use the same proxy that we used for electronic-store for this application too in angular.json file:

{
...
"projects": {
...
"es-admin": {
...
"architect": {
...
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "es-admin:build",
"proxyConfig": "apps/electronic-
store/proxy.conf.json"

},
...

}

Now that our proxy is set up, let's install some dependencies in our application using npm:

> npm install @angular/cdk lodash-es @auth0/angular-jwt auth0-js --save

Now that we have all the dependencies installed and the new client application has been configured, let's create a new library using Nx for SharedModule.

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

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