Browse Source

chore: add ngx-datatable styles to module template

pull/4216/head
mehmet-erim 6 years ago
parent
commit
b990b2babe
  1. 60
      templates/module/angular/angular.json
  2. 19
      templates/module/angular/src/app/app.component.ts

60
templates/module/angular/angular.json

@ -24,27 +24,44 @@
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": true, "aot": true,
"extractCss": true, "extractCss": true,
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico",
"src/assets"
],
"styles": [ "styles": [
{
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"inject": false,
"bundleName": "bootstrap-rtl.min"
},
{ {
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css", "input": "node_modules/bootstrap/dist/css/bootstrap.min.css",
"inject": true, "inject": true,
"bundleName": "bootstrap.min" "bundleName": "bootstrap-ltr.min"
}, },
"src/styles.scss",
{ {
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css", "input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"inject": false, "inject": true,
"bundleName": "fontawesome-all.min" "bundleName": "fontawesome-all.min"
}, },
{ {
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css", "input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"inject": false, "inject": true,
"bundleName": "fontawesome-v4-shims.min" "bundleName": "fontawesome-v4-shims.min"
} },
{
"input": "node_modules/@swimlane/ngx-datatable/index.css",
"inject": true,
"bundleName": "ngx-datatable-index"
},
{
"input": "node_modules/@swimlane/ngx-datatable/assets/icons.css",
"inject": true,
"bundleName": "ngx-datatable-icons"
},
{
"input": "node_modules/@swimlane/ngx-datatable/themes/material.css",
"inject": true,
"bundleName": "ngx-datatable-material"
},
"src/styles.scss"
], ],
"scripts": [] "scripts": []
}, },
@ -102,10 +119,7 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico",
"src/assets"
],
"styles": [ "styles": [
{ {
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css", "input": "node_modules/bootstrap/dist/css/bootstrap.min.css",
@ -130,14 +144,8 @@
"lint": { "lint": {
"builder": "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options": { "options": {
"tsConfig": [ "tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"tsconfig.app.json", "exclude": ["**/node_modules/**"]
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
} }
}, },
"e2e": { "e2e": {
@ -187,9 +195,7 @@
"projects/my-project-name/tsconfig.lib.json", "projects/my-project-name/tsconfig.lib.json",
"projects/my-project-name/tsconfig.spec.json" "projects/my-project-name/tsconfig.spec.json"
], ],
"exclude": [ "exclude": ["**/node_modules/**"]
"**/node_modules/**"
]
} }
} }
} }
@ -227,9 +233,7 @@
"projects/my-project-name-config/tsconfig.lib.json", "projects/my-project-name-config/tsconfig.lib.json",
"projects/my-project-name-config/tsconfig.spec.json" "projects/my-project-name-config/tsconfig.spec.json"
], ],
"exclude": [ "exclude": ["**/node_modules/**"]
"**/node_modules/**"
]
} }
} }
} }
@ -239,4 +243,4 @@
"cli": { "cli": {
"analytics": false "analytics": false
} }
} }

19
templates/module/angular/src/app/app.component.ts

@ -1,6 +1,4 @@
import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core'; import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { forkJoin } from 'rxjs';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -9,17 +7,4 @@ import { forkJoin } from 'rxjs';
<router-outlet></router-outlet> <router-outlet></router-outlet>
`, `,
}) })
export class AppComponent implements OnInit { export class AppComponent {}
constructor(private lazyLoadService: LazyLoadService) {}
ngOnInit() {
forkJoin([
this.lazyLoadService.load(
LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-v4-shims.min.css'),
),
this.lazyLoadService.load(
LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-all.min.css'),
),
]).subscribe();
}
}

Loading…
Cancel
Save