Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/3475/head
Halil İbrahim Kalkan 7 years ago
parent
commit
ea928f8937
  1. 20
      npm/ng-packs/apps/dev-app/src/app/app.component.ts
  2. 21
      templates/app/angular/src/app/app.component.ts

20
npm/ng-packs/apps/dev-app/src/app/app.component.ts

@ -1,5 +1,6 @@
import { LazyLoadService } from '@abp/ng.core'; import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { forkJoin } from 'rxjs';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -12,14 +13,13 @@ export class AppComponent implements OnInit {
constructor(private lazyLoadService: LazyLoadService) {} constructor(private lazyLoadService: LazyLoadService) {}
ngOnInit() { ngOnInit() {
this.lazyLoadService forkJoin(
.load( this.lazyLoadService.load(
['fontawesome-all.min.css', 'fontawesome-v4-shims.min.css'], LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-v4-shims.min.css'),
'style', ),
null, this.lazyLoadService.load(
'head', LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-all.min.css'),
'afterbegin', ),
) ).subscribe();
.subscribe();
} }
} }

21
templates/app/angular/src/app/app.component.ts

@ -1,5 +1,6 @@
import { LazyLoadService } from '@abp/ng.core'; import { LazyLoadService, LOADING_STRATEGY } from '@abp/ng.core';
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { forkJoin } from 'rxjs';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -10,15 +11,15 @@ import { Component, OnInit } from '@angular/core';
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
constructor(private lazyLoadService: LazyLoadService) {} constructor(private lazyLoadService: LazyLoadService) {}
async ngOnInit() {
this.lazyLoadService ngOnInit() {
.load( forkJoin(
['fontawesome-all.min.css', 'fontawesome-v4-shims.min.css'], this.lazyLoadService.load(
'style', LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-v4-shims.min.css')
null,
'head',
'afterbegin'
) )
.subscribe(); this.lazyLoadService.load(
LOADING_STRATEGY.PrependAnonymousStyleToHead('fontawesome-all.min.css')
),
).subscribe();
} }
} }

Loading…
Cancel
Save