mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix: resolve errors w/ Closure Compiler. (#659)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
export class MdError extends Error {
|
||||
constructor(value: string) {
|
||||
super();
|
||||
super.message = value;
|
||||
this.message = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user