Assign1
This project was generated with Angular CLI version 1.5.3.
Development server
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.
Code scaffolding
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
.
Build
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.
Running unit tests
Run ng test
to execute the unit tests via Karma.
Running end-to-end tests
Run ng e2e
to execute the end-to-end tests via Protractor.
Further help
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
#setup data tables [https://l-lin.github.io/angular-datatables/#/getting-started]
npm install angular-datatables --save
install the dataTables script files
npm install datatables.net --save npm install datatables.net-dt --save
npm install @types/jquery --save-dev npm install @types/datatables.net --save-dev
install the responsive feature of data tables
npm install datatables.net-responsive --save npm install datatables.net-responsive-dt --save
install the buttons feature of dataTables
npm install datatables.net-buttons --save npm install datatables.net-buttons-dt --save
install the select feature of dataTables
npm install datatables.net-select --save npm install datatables.net-select-dt --save
After installing these, include the required js and css files in the scripts
and styles
property in
apps[{}]
in angular-cli.json file.
Next, import { DataTablesModule } from 'angular-datatables';
in app.module.ts and includeDataTablesModule
in imports
.
#setup MEANstack [https://scotch.io/tutorials/mean-app-with-angular-2-and-the-angular-cli]
install node
install angular cli => npm install -g @angular/cli
create new project => ng new mean-app => cd mean-app
run command => ng build
this is to create the "dist" folder, to which the node server will point to run the app