1 |
{{ variable | date : "dd.MM.y" }} |
Category Angular 5
1 2 3 4 5 |
// using string <div ng-if='results.dataType === "textTable"'> This text belongs in a table.</div> // using integer <div ng-if='results.dataType > 0'> This text belongs in a table.</div> |
ng generate module modulename
1 |
ng generate module dir/componenetname-routing --flat --module=app |
1 |
ng generate component componentname |
for pre component
1 |
ng generate component dirname/componentname |
short code
1 |
ng g c componentname |
Then install the Angular CLI globally.
1 |
npm install -g @angular/cli |
Step 2. Create a new project
Open a terminal window.
Generate a new project and default app by running the following command:
1 |
ng new my-app |
The Angular CLI installs the necessary npm packages, creates the project files, and populates the project with a simple default app. This can take some time.
Step 3: Serve the application
Go to the project directory and launch the server.
1 2 |
cd my-app ng serve --open |