Skip to content

Commit

Permalink
chore(): update quickstar with proper media.broadcast usage (#71)
Browse files Browse the repository at this point in the history
* chore(): update quickstar with proper media.broadcast usage

reference Teradata/covalent#685

* fix(): ninja remove version from package.json
  • Loading branch information
emoralesb05 authored Jun 10, 2017
1 parent 59720d5 commit 51b725d
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
8 changes: 4 additions & 4 deletions src/app/dashboard-product/dashboard-product.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
10 changes: 5 additions & 5 deletions src/app/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions src/app/logs/logs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
4 changes: 0 additions & 4 deletions src/app/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ export class MainComponent {
title: 'Manage Users',
route: '/users',
icon: 'people',
}, {
title: 'Covalent Templates',
route: '/templates',
icon: 'view_module',
},
];

Expand Down
10 changes: 5 additions & 5 deletions src/app/users/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions src/app/users/users.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 51b725d

Please sign in to comment.