mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(sidenav): align text at start (#1297)
This commit is contained in:
@@ -226,6 +226,15 @@ describe('MdSidenav', () => {
|
||||
expect(sidenavEl.classList).toContain('md-sidenav-opened');
|
||||
});
|
||||
|
||||
it('should remove align attr from DOM', () => {
|
||||
const fixture = TestBed.createComponent(BasicTestApp);
|
||||
fixture.detectChanges();
|
||||
|
||||
const sidenavEl = fixture.debugElement.query(By.css('md-sidenav')).nativeElement;
|
||||
expect(sidenavEl.hasAttribute('align'))
|
||||
.toBe(false, 'Expected sidenav not to have a native align attribute.');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -38,6 +38,8 @@ export class MdDuplicatedSidenavError extends MdError {
|
||||
template: '<ng-content></ng-content>',
|
||||
host: {
|
||||
'(transitionend)': '_onTransitionEnd($event)',
|
||||
// must prevent the browser from aligning text based on value
|
||||
'[attr.align]': 'null'
|
||||
},
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
|
||||
Reference in New Issue
Block a user