This project was generated with Angular CLI version 1.0.4.
The FreeNAS WebUI is built with official Angular Material Design components and features:
- Lazy loading
- AOT compilation
- Color Scheme / Theme Picker
- Translations
- Websockets / REST calls to the FreeNAS 11 API
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.
Run ng generate component component-name to generate a new component.
You can also use ng generate directive|pipe|service|class|module.
These examples use angular-cli to generate code in specific locations
- generate a 'common' Module for the 'pages' Component:
ng generate component pages
ng generate module pages/common
- Add a component for to handle confirm dialogs in the 'pages' common module:
ng generate component pages/common/confirm-dialog
ng generate service services/dialog
- In our 'pages' component we implement the 'dashboard' using a component, module, and routing table. Now let's add a 'linechart' component to the dashboard:
ng generate component pages/dashboard/linechart
If you follow these examples when extending the FreeNAS WebUI you'll have good karma for the rest of the day.
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.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.