Skip to content

Commit

Permalink
fix tests, make Dir optional
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin committed Dec 5, 2016
1 parent 4c0a796 commit f7a97de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/e2e-app/tabs/tabs-e2e.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<md-tab-group>
<md-tab>
<template md-tab-label>One</template>
<template md-tab-content>First tab's content</template>
First tab's content
</md-tab>
<md-tab>
<template md-tab-label>Two</template>
<template md-tab-content>Second tab's content</template>
Second tab's content
</md-tab>
<md-tab>
<template md-tab-label>Three</template>
<template md-tab-content>Third tab's content</template>
Third tab's content
</md-tab>
</md-tab-group>
</section>
5 changes: 1 addition & 4 deletions src/lib/tabs/tab-group.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ describe('MdTabGroup', () => {
AsyncTabsTestApp,
DisabledTabsTestApp,
TabGroupWithSimpleApi,
],
providers: [
{ provide: Dir, useFactory: () => { return {value: 'ltr'}; }
}]
]
});

TestBed.compileComponents();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/tabs/tab-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
NgZone,
QueryList,
ElementRef,
Renderer, ViewEncapsulation, ContentChildren, Output, EventEmitter
Renderer, ViewEncapsulation, ContentChildren, Output, EventEmitter, Optional
} from '@angular/core';
import {RIGHT_ARROW, LEFT_ARROW, ENTER, Dir, LayoutDirection} from '../core';
import {MdTabLabelWrapper} from './tab-label-wrapper';
Expand Down Expand Up @@ -71,7 +71,7 @@ export class MdTabHeader {
constructor(private _zone: NgZone,
private _elementRef: ElementRef,
private _renderer: Renderer,
private _dir: Dir) {}
@Optional() private _dir: Dir) {}

/**
* Waits one frame for the view to update, then updates the ink bar and scroll.
Expand Down

0 comments on commit f7a97de

Please sign in to comment.