Skip to content

Latest commit

 

History

History
64 lines (35 loc) · 2.06 KB

README-egret.md

File metadata and controls

64 lines (35 loc) · 2.06 KB

FreeNAS 11 - WebUI

This project was generated with Angular CLI version 1.0.4.

Angular / Material Design

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

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|module.

Examples

These examples use angular-cli to generate code in specific locations

  1. generate a 'common' Module for the 'pages' Component:

ng generate component pages

ng generate module pages/common

  1. 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

  1. 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.

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. Before running the tests make sure you are serving the app via ng serve.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.