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 12f509c218
commit 89a39bb22a
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'); 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 button = element(by.css('button'));
const rejectMessage = element(by.css('p')); const rejectMessage = element(by.css('p'));
button.click(); button.click();

View File

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