refactor(docs-infra): fix `strictTemplates` failures in `accessibility` docs example (#39248)

fix `strictTemplates` failures in `accessibility` docs example

PR Close #39248
This commit is contained in:
Vlasis Charalampous 2020-10-13 22:02:45 +03:00 committed by Andrew Kushnir
parent b5ec5a7fca
commit 79d67dc1f4
3 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,7 @@ describe('Accessibility example e2e tests', () => {
it('should take a number and change progressbar width', () => {
element(by.css('input')).sendKeys('16');
expect(element(by.css('input')).getAttribute('value')).toEqual('016');
expect(element(by.css('input')).getAttribute('value')).toEqual('16');
expect(element(by.css('app-example-progressbar div')).getCssValue('width')).toBe('48px');
});

View File

@ -3,7 +3,7 @@
<label>
Enter an example progress value
<input type="number" min="0" max="100"
[value]="progress" (input)="progress = $event.target.value">
[value]="progress" (input)="setProgress($event)">
</label>
<!-- The user of the progressbar sets an aria-label to communicate what the progress means. -->

View File

@ -7,4 +7,8 @@ import { Component } from '@angular/core';
})
export class AppComponent {
progress = 0;
setProgress($event: Event) {
this.progress = +($event.target as HTMLInputElement).value;
}
}