TypeScript based JS framework
This project was generated with Angular CLI version 1.4.3.
Run npm install
to download node modules.
These lessons assume basic knowledge of JavaScript, TypeScript syntax and HTML and CSS. If you don't know TypeScript, please visit TypeScript repo.
Table of Contents
- Using angular-cli
- Using Angular Material
- Structural Directives
- Managing Classes
- Data Binding
- Services
- Routing
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
This application uses json-server
. So, install json-server globally using:
npm install -g json-server
Put the data file db.json
into json-server folder.
Move to the folder to run json-server. To run the server use:
json-server --watch db.json
This server will serve the information from db.json and it will be available on the urls mentioned in the console. It usually uses port 3000.
In order to serve images from json-server, use command:
json-server --watch db.json -d 2000
It delays response by 2000ms.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
We used ng build --target=production
to build the dist
folder. Then all the contents of dist
folder can be moved to public
folder on the cloud to run your application.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.