Skip to content

Commit

Permalink
fix: lint and aot errors
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Jun 27, 2017
1 parent 73d7a46 commit 417c6ed
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 31 deletions.
60 changes: 30 additions & 30 deletions src/lib/core/portal/portal-injector.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Injector} from '@angular/core';

/**
* Custom injector to be used when providing custom
* injection tokens to components inside a portal.
* @docs-private
*/
export class PortalInjector implements Injector {
constructor(
private _parentInjector: Injector,
private _customTokens: WeakMap<any, any>) { }

get(token: any, notFoundValue?: any): any {
const value = this._customTokens.get(token);

if (typeof value !== 'undefined') {
return value;
}

return this._parentInjector.get<any>(token, notFoundValue);
}
}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Injector} from '@angular/core';

/**
* Custom injector to be used when providing custom
* injection tokens to components inside a portal.
* @docs-private
*/
export class PortalInjector implements Injector {
constructor(
private _parentInjector: Injector,
private _customTokens: WeakMap<any, any>) { }

get(token: any, notFoundValue?: any): any {
const value = this._customTokens.get(token);

if (typeof value !== 'undefined') {
return value;
}

return this._parentInjector.get<any>(token, notFoundValue);
}
}
7 changes: 6 additions & 1 deletion src/lib/snack-bar/simple-snack-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ import {MdSnackBarRef, MD_SNACK_BAR_DATA} from './index';
}
})
export class SimpleSnackBar {
/** Data that was injected into the snack bar. */
data: { message: string, action: string };

constructor(
public snackBarRef: MdSnackBarRef<SimpleSnackBar>,
@Inject(MD_SNACK_BAR_DATA) public data: { message: string, action: string }) { }
@Inject(MD_SNACK_BAR_DATA) data: any) {
this.data = data;
}

/** Dismisses the snack bar. */
dismiss(): void {
Expand Down

0 comments on commit 417c6ed

Please sign in to comment.