forked from mgechev/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Add PrimeNG
Clayton K. N. Passos edited this page Jun 10, 2016
·
23 revisions
- npm install
npm install --save primeng
npm install --save primeui
npm install --save font-awesome
{src: 'primeui/primeui-ng-all.min.css', inject: true},
{src: 'primeui/primeui-ng-all.min.js', inject: true}
Do you need add font-awesome.min.css to, you can modify seed.config.ts or proceed like above
/**
* The list of local files to be injected in the `index.html`.
* @type {InjectableDependency[]}
*/
APP_ASSETS: InjectableDependency[] = [
{ src: `${this.CSS_SRC}/main.${ this.getInjectableStyleExtension() }`, inject: true, vendor: false },
{ src: `${this.CSS_SRC}/font-awesome.min.css`, inject: true, vendor: true }
];
- The configuration of SystemJS for the
dev
environment. Modify SYSTEM_CONFIG_DEV in seed.config.ts adding this:
'primeng': `${this.APP_BASE}node_modules/primeng`,
Example:
/**
* The configuration of SystemJS for the `dev` environment.
* @type {any}
*/
protected SYSTEM_CONFIG_DEV: any = {
defaultJSExtensions: true,
packageConfigPaths: [
`${this.APP_BASE}node_modules/*/package.json`,
`${this.APP_BASE}node_modules/**/package.json`,
`${this.APP_BASE}node_modules/@angular/*/package.json`
],
paths: {
[this.BOOTSTRAP_MODULE]: `${this.APP_BASE}${this.BOOTSTRAP_MODULE}`,
'@angular/core': `${this.APP_BASE}node_modules/@angular/core/core.umd.js`,
'@angular/common': `${this.APP_BASE}node_modules/@angular/common/common.umd.js`,
'@angular/compiler': `${this.APP_BASE}node_modules/@angular/compiler/compiler.umd.js`,
'@angular/http': `${this.APP_BASE}node_modules/@angular/http/http.umd.js`,
'@angular/router': `${this.APP_BASE}node_modules/@angular/router/router.umd.js`,
'@angular/platform-browser': `${this.APP_BASE}node_modules/@angular/platform-browser/platform-browser.umd.js`,
'@angular/platform-browser-dynamic': `${this.APP_BASE}node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js`,
'rxjs/*': `${this.APP_BASE}node_modules/rxjs/*`,
'primeng': `${this.APP_BASE}node_modules/primeng`,
'app/*': `/app/*`,
'*': `${this.APP_BASE}node_modules/*`
},
packages: {
rxjs: { defaultExtension: false }
}
};