Friday, 4 May 2018

Angular some shortcut commands

                  Angular some shortcut commands

ng new TestAngularSample : To create a new project as "TestAngularSample"

ng g c my-new-component : To create a new component as "my-new-component"

ng g directive my-new-directive : To create a new directive as "my-new-directive"

ng g pipe my-new-pipe : To create a new Pipe as "my-new-pipe"

ng g service my-new-service : To create a new Service as "my-new-service"

ng g class my-new-class : To create a new Class as "my-new-class"

ng g interface my-new-interface : To create a new Interface as "my-new-interface"

ng g enum my-new-enum : To create a new Enum as "my-new-enum"

ng g module my-module : To create a new Module as "my-module"

ng g directive /directive/my-new-directive : Create a directive inside a particular folder, If folder doesnt exists then firstly this command will create folder and then create directive inside "directive" folder.

ng --version : To check application version

ng serve : To run an application

ng serve --o : To run an application and will open browser automatically.

ng g module app-routing -flat --module --opp : It will create an app-routing module file.

npm-cache install : try to install npm, bower, and composer components

npm-cache install bower : install only bower components

npm-cache install bower npm : install bower and npm components

npm-cache install bower --allow-root composer --dry-run : install bower with allow-root, and composer with --dry-run

npm-cache install --cacheDirectory /home/cache/  bower : install components using /home/cache as cache directory

npm-cache install --forceRefresh  bower : force installing dependencies from package manager without cache

npm-cache install --noArchive  npm : installs dependencies and caches them without compressing

npm-cache clean : cleans out all cached files in cache directory

Ctrl+Shift+P : To open Command Palette

Ctrl+` : To open Integrated Terminal

Ctrl+\ : Split Editor

Ctrl+Alt+O : For indention





Constructor

1. What is a Constructor in C#? A constructor is a special method that runs when an object of a class is created. It initializes the object ...