2015-07-07 15:44:29 -07:00
|
|
|
/**
|
|
|
|
* This indirection is needed to free up Component, etc symbols in the public API
|
|
|
|
* to be used by the decorator versions of these annotations.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import {makeDecorator} from 'angular2/src/util/decorators';
|
|
|
|
import {CanActivate as CanActivateAnnotation} from './lifecycle_annotations_impl';
|
2015-08-04 15:08:59 -07:00
|
|
|
import {Promise} from 'angular2/src/facade/async';
|
2015-07-17 13:36:53 -07:00
|
|
|
import {ComponentInstruction} from 'angular2/src/router/instruction';
|
2015-07-07 15:44:29 -07:00
|
|
|
|
|
|
|
export {
|
|
|
|
canReuse,
|
|
|
|
canDeactivate,
|
|
|
|
onActivate,
|
|
|
|
onReuse,
|
|
|
|
onDeactivate
|
|
|
|
} from './lifecycle_annotations_impl';
|
|
|
|
|
2015-08-04 15:08:59 -07:00
|
|
|
export var CanActivate:
|
2015-07-17 13:36:53 -07:00
|
|
|
(hook: (next: ComponentInstruction, prev: ComponentInstruction) => Promise<boolean>| boolean) => ClassDecorator =
|
2015-08-04 15:08:59 -07:00
|
|
|
makeDecorator(CanActivateAnnotation);
|