fix(sidenav): align text at start (#1297)

This commit is contained in:
Kara
2016-09-21 14:40:34 -07:00
committed by GitHub
parent b284dd483e
commit 0e0ff0e7aa
2 changed files with 11 additions and 0 deletions
+9
View File
@@ -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.');
});
});
});
+2
View File
@@ -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,