For Angular4 need node_modules
- This will add the node_modules into the existing angular project
npm install
- For create a new component
ng generate component servers //<-- servers is component name>
or
ng g c servers //<-- servers is component name>
- For create a new Directive
ng generate directive servers //<-- servers is directive name>
or
ng g directive servers //<-- servers is directive name>
You can create a component inside the other components
ng g c server/server --spec false // this will create a sub-component inside the parent component without spec.ts file
Another example of command line create the component
ng g c recipes/recipe-list --spec false
ng g c recipes/recipe-detail --spec false
install the bootstrap using npm
npm install --save bootstrap
It is called Decorator
@Component