style(service-worker): fix code formatting in service-worker-getting-started example (#28020)

PR Close #28020
This commit is contained in:
George Kalpakas 2019-01-10 22:28:59 +02:00 committed by Andrew Kushnir
parent 1640832f56
commit 84c1bad3a1
2 changed files with 5 additions and 4 deletions

View File

@ -34,8 +34,9 @@ describe('sw-example App', () => {
expect(items[3].getText()).toBe('Angular blog');
});
});
// Check for a rejected promise as the service worker is not enabled
it('SwUpdate.checkForUpdate() should return a rejected promise', () => {
// Check for a rejected promise as the service worker is not enabled
it('SwUpdate.checkForUpdate() should return a rejected promise', () => {
const button = element(by.css('button'));
const rejectMessage = element(by.css('p'));
button.click();

View File

@ -12,9 +12,9 @@ export class AppComponent {
constructor(private update: SwUpdate) {}
updateCheck(): void {
this.update
this.update
.checkForUpdate()
.then(() => this.updateCheckText = 'resolved')
.catch(err => this.updateCheckText = `rejected: ${err.message}`);
}
}
}