fix: resolve errors w/ Closure Compiler. (#659)

This commit is contained in:
Jeremy Elbourn
2016-06-10 10:21:01 -07:00
committed by GitHub
parent ce27341c2e
commit fbdb35b4e9
4 changed files with 22 additions and 21 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export {MdIconRegistry} from './icon-registry';
/** Exception thrown when an invalid icon name is passed to an md-icon component. */
export class MdIconInvalidNameError extends MdError {
constructor(iconName: string) {
super(`Invalid icon name: "${name}"`);
super(`Invalid icon name: "${iconName}"`);
}
}
@@ -251,8 +251,8 @@ function clamp(v: number) {
* Returns the current timestamp either based on the performance global or a date object.
*/
function now() {
if (typeof performance !== 'undefined' && performance.now) {
return performance.now();
if (window.performance && window.performance.now) {
return window.performance.now();
}
return Date.now();
}
+1 -1
View File
@@ -6,6 +6,6 @@
export class MdError extends Error {
constructor(value: string) {
super();
super.message = value;
this.message = value;
}
}
+18 -17
View File
@@ -24,6 +24,24 @@ let defaultPositionList = [
];
/**
* Directive applied to an element to make it usable as an origin for an Overlay using a
* ConnectedPositionStrategy.
*/
@Directive({
selector: '[overlay-origin]',
exportAs: 'overlayOrigin',
})
export class OverlayOrigin {
constructor(private _elementRef: ElementRef) { }
get elementRef() {
return this._elementRef;
}
}
/**
* Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.
*/
@@ -86,21 +104,4 @@ export class ConnectedOverlayDirective implements OnInit, OnDestroy {
}
/**
* Directive applied to an element to make it usable as an origin for an Overlay using a
* ConnectedPositionStrategy.
*/
@Directive({
selector: '[overlay-origin]',
exportAs: 'overlayOrigin',
})
export class OverlayOrigin {
constructor(private _elementRef: ElementRef) { }
get elementRef() {
return this._elementRef;
}
}
export const OVERLAY_DIRECTIVES = [ConnectedOverlayDirective, OverlayOrigin];