File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,15 @@ describe('MdSidenav', () => {
226
226
expect ( sidenavEl . classList ) . toContain ( 'md-sidenav-opened' ) ;
227
227
} ) ;
228
228
229
+ it ( 'should remove align attr from DOM' , ( ) => {
230
+ const fixture = TestBed . createComponent ( BasicTestApp ) ;
231
+ fixture . detectChanges ( ) ;
232
+
233
+ const sidenavEl = fixture . debugElement . query ( By . css ( 'md-sidenav' ) ) . nativeElement ;
234
+ expect ( sidenavEl . hasAttribute ( 'align' ) )
235
+ . toBe ( false , 'Expected sidenav not to have a native align attribute.' ) ;
236
+ } ) ;
237
+
229
238
} ) ;
230
239
231
240
} ) ;
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ export class MdDuplicatedSidenavError extends MdError {
38
38
template : '<ng-content></ng-content>' ,
39
39
host : {
40
40
'(transitionend)' : '_onTransitionEnd($event)' ,
41
+ // must prevent the browser from aligning text based on value
42
+ '[attr.align]' : 'null'
41
43
} ,
42
44
changeDetection : ChangeDetectionStrategy . OnPush ,
43
45
encapsulation : ViewEncapsulation . None ,
You can’t perform that action at this time.
0 commit comments