diff --git a/package.json b/package.json index 97d52cac..a91f7ca2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "covalent-quickstart", - "version": "1.0.0-beta.3", + "version": "1.0.0", "private": true, "description": "Quickstart App with @covalent packages", "keywords": [ diff --git a/src/app/dashboard-product/dashboard-product.component.ts b/src/app/dashboard-product/dashboard-product.component.ts index b7c006df..c54ac2de 100644 --- a/src/app/dashboard-product/dashboard-product.component.ts +++ b/src/app/dashboard-product/dashboard-product.component.ts @@ -23,9 +23,9 @@ export class DashboardProductComponent implements AfterViewInit, OnInit { ngAfterViewInit(): void { // broadcast to all listener observables when loading the page - Promise.resolve(undefined).then(() => { - this.media.broadcast(); - this._changeDetectorRef.markForCheck(); - }); + this.media.broadcast(); + // force a new change detection cycle since change detections + // have finished when `ngAfterViewInit` is executed + this._changeDetectorRef.detectChanges(); } } diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts index a40bf377..8d01703a 100644 --- a/src/app/form/form.component.ts +++ b/src/app/form/form.component.ts @@ -18,11 +18,11 @@ export class FormComponent implements AfterViewInit { private _changeDetectorRef: ChangeDetectorRef) { } ngAfterViewInit(): void { - Promise.resolve(undefined).then(() => { - // broadcast to all listener observables when loading the page - this.media.broadcast(); - this._changeDetectorRef.markForCheck(); - }); + // broadcast to all listener observables when loading the page + this.media.broadcast(); + // force a new change detection cycle since change detections + // have finished when `ngAfterViewInit` is executed + this._changeDetectorRef.detectChanges(); } toggleRequiredStep2(): void { diff --git a/src/app/logs/logs.component.ts b/src/app/logs/logs.component.ts index 08d19c82..b413fc88 100644 --- a/src/app/logs/logs.component.ts +++ b/src/app/logs/logs.component.ts @@ -68,11 +68,11 @@ export class LogsComponent implements AfterViewInit, OnInit { } ngAfterViewInit(): void { - Promise.resolve(undefined).then(() => { - // broadcast to all listener observables when loading the page - this.media.broadcast(); - this._changeDetectorRef.markForCheck(); - }); + // broadcast to all listener observables when loading the page + this.media.broadcast(); + // force a new change detection cycle since change detections + // have finished when `ngAfterViewInit` is executed + this._changeDetectorRef.detectChanges(); } } diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index af2b0393..955fd554 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -24,10 +24,6 @@ export class MainComponent { title: 'Manage Users', route: '/users', icon: 'people', - }, { - title: 'Covalent Templates', - route: '/templates', - icon: 'view_module', }, ]; diff --git a/src/app/users/form/form.component.ts b/src/app/users/form/form.component.ts index 2475d78c..ce29c2de 100644 --- a/src/app/users/form/form.component.ts +++ b/src/app/users/form/form.component.ts @@ -31,11 +31,11 @@ export class UsersFormComponent implements OnInit, AfterViewInit { } ngAfterViewInit(): void { - Promise.resolve(undefined).then(() => { - // broadcast to all listener observables when loading the page - this.media.broadcast(); - this._changeDetectorRef.markForCheck(); - }); + // broadcast to all listener observables when loading the page + this.media.broadcast(); + // force a new change detection cycle since change detections + // have finished when `ngAfterViewInit` is executed + this._changeDetectorRef.detectChanges(); } ngOnInit(): void { diff --git a/src/app/users/users.component.ts b/src/app/users/users.component.ts index 6783c172..8dbea04a 100644 --- a/src/app/users/users.component.ts +++ b/src/app/users/users.component.ts @@ -38,11 +38,11 @@ export class UsersComponent implements AfterViewInit, OnInit { } ngAfterViewInit(): void { - Promise.resolve(undefined).then(() => { - // broadcast to all listener observables when loading the page - this.media.broadcast(); - this._changeDetectorRef.markForCheck(); - }); + // broadcast to all listener observables when loading the page + this.media.broadcast(); + // force a new change detection cycle since change detections + // have finished when `ngAfterViewInit` is executed + this._changeDetectorRef.detectChanges(); } filterUsers(displayName: string = ''): void {