Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(aot): change @Inputs to not be private #1289

Merged
merged 1 commit into from
Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {MdRippleModule} from '@angular2-material/core';
moduleId: module.id,
selector: 'button[md-button], button[md-raised-button], button[md-icon-button], ' +
'button[md-fab], button[md-mini-fab]',
inputs: ['color'],
host: {
'[class.md-button-focus]': '_isKeyboardFocused',
'(mousedown)': '_setMousedown()',
Expand All @@ -47,6 +46,7 @@ export class MdButton {

constructor(private _elementRef: ElementRef, private _renderer: Renderer) { }

@Input()
get color(): string {
return this._color;
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/sidenav/sidenav.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ describe('MdSidenav', () => {
it('should correctly parse opened="true"', () => {
let fixture = TestBed.createComponent(SidenavSetToOpenedTrue);
fixture.detectChanges();
endSidenavTransition(fixture);

let sidenavEl = fixture.debugElement.query(By.css('md-sidenav')).nativeElement;

Expand Down
9 changes: 6 additions & 3 deletions src/lib/sidenav/sidenav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
ViewEncapsulation,
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {Dir, MdError, BooleanFieldValue} from '@angular2-material/core';
import {Dir, MdError} from '@angular2-material/core';

/** Exception thrown when two MdSidenav are matching the same side. */
export class MdDuplicatedSidenavError extends MdError {
Expand Down Expand Up @@ -50,7 +50,7 @@ export class MdSidenav {
@Input() mode: 'over' | 'push' | 'side' = 'over';

/** Whether the sidenav is opened. */
@Input('opened') @BooleanFieldValue() private _opened: boolean = false;
_opened: boolean = false;

/** Event emitted when the sidenav is being opened. Use this to synchronize animations. */
@Output('open-start') onOpenStart = new EventEmitter<void>();
Expand All @@ -75,9 +75,12 @@ export class MdSidenav {
* Whether the sidenav is opened. We overload this because we trigger an event when it
* starts or end.
*/
@Input()
get opened(): boolean { return this._opened; }
set opened(v: boolean) {
this.toggle(v);
// TODO(jelbourn): this coercion goes away when BooleanFieldValue is removed.
let booleanValue = v != null && `${v}` !== 'false';
this.toggle(booleanValue);
}


Expand Down