UNPKG

1.61 kBSource Map (JSON)View Raw
1{"version":3,"file":"route_lifecycle_reflector.js","sourceRoot":"","sources":["../../../../../modules/@angular/router-deprecated/src/lifecycle/route_lifecycle_reflector.ts"],"names":[],"mappings":";AAAA,qBAAmB,eAAe,CAAC,CAAA;AAEnC,6BAAwB,oBAAoB,CAAC,CAAA;AAE7C,2CAA8C,8BAA8B,CAAC,CAAA;AAE7E,0BAAiC,CAAqB,EAAE,IAAS,CAAC,iBAAiB;IACjF,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,YAAY,WAAI,CAAC,CAAC;QAAC,MAAM,CAAC,KAAK,CAAC;IAC1C,MAAM,CAAC,CAAC,CAAC,IAAI,IAAU,IAAK,CAAC,SAAS,CAAC;AACzC,CAAC;AAHe,wBAAgB,mBAG/B,CAAA;AAED,4BAAmC,IAAS,CAAC,iBAAiB;IAC5D,IAAI,WAAW,GAAG,wBAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9C,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,IAAI,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAChC,EAAE,CAAC,CAAC,UAAU,YAAY,wCAAW,CAAC,CAAC,CAAC;YACtC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;AACd,CAAC;AAVe,0BAAkB,qBAUjC,CAAA","sourcesContent":["import {Type} from '@angular/core';\n\nimport {reflector} from '../../core_private';\n\nimport {CanActivate, RouteLifecycleHook} from './lifecycle_annotations_impl';\n\nexport function hasLifecycleHook(e: RouteLifecycleHook, type: any /** TODO #9100 */): boolean {\n if (!(type instanceof Type)) return false;\n return e.name in (<any>type).prototype;\n}\n\nexport function getCanActivateHook(type: any /** TODO #9100 */): Function {\n var annotations = reflector.annotations(type);\n for (let i = 0; i < annotations.length; i += 1) {\n let annotation = annotations[i];\n if (annotation instanceof CanActivate) {\n return annotation.fn;\n }\n }\n\n return null;\n}\n"]}
\No newline at end of file