Monday, July 5, 2021

Angular

Version Checkingnode -v
npm -v 
ng v 
ng commandsnew app=> ng new appname
start app=> ng serve
                    ng serve --open
to test app =>
     karma                  ng test 
     protractor            ng e2e
For e2e add @cypress/schematic: 
ng add @cypress/schematic
(the older e2e tester was protractor which is now deprecated)

ng new => ng new appname --dry-run OR ng new appname -d  (Dry run just list the files that will be created with their byte sizes)
                  ng new appname --skip-install OR ng new appname -si (skips npm install) 
                  ng new appname --skip-tests OR ng new appname -st (skips test) 
                  ng new appname --inline-template OR ng new appname -it  ( templates will be inline) 
                 ng new appname --inline-style OR ng new appname -is ( style inline)
                 ng new appname --style  css/scss/...
                 ng new appname --prefix xxxx  (the prefix for selector of components)
                 ng g c --prefix XXXX <= applicable only to this component
                       
Note 1 : angular.json file was called as angular-cli.json in versions 5x and earlier.

No comments:

Post a Comment

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...