
The adapter only compiles ng1 template. This means that we need to reimplement / emulate all of the ng1’s API on the HOST element. interface IDirective { compile?: IDirectiveCompileFn; // NOT SUPPORTED controller?: any; // IMPLEMENTED controllerAs?: string; // IMPLEMENTED bindToController?: boolean|Object; // IMPLEMENTED link?: IDirectiveLinkFn | IDirectivePrePost; // IMPLEMENTED (pre-link only) name?: string; // N/A priority?: number; // NOT SUPPORTED replace?: boolean; // NOT SUPPORTED require?: any; // IMPLEMENTED restrict?: string; // WORKING scope?: any; // IMPLEMENTED template?: any; // IMPLEMENTED templateUrl?: any; // IMPLEMENTED terminal?: boolean; // NOT SUPPORTED transclude?: any; // IMPLEMENTED }
16 lines
637 B
TypeScript
16 lines
637 B
TypeScript
export const NG2_APP_VIEW_MANAGER = 'ng2.AppViewManager';
|
|
export const NG2_COMPILER = 'ng2.Compiler';
|
|
export const NG2_INJECTOR = 'ng2.Injector';
|
|
export const NG2_PROTO_VIEW_REF_MAP = 'ng2.ProtoViewRefMap';
|
|
export const NG2_ZONE = 'ng2.NgZone';
|
|
|
|
export const NG1_CONTROLLER = '$controller';
|
|
export const NG1_SCOPE = '$scope';
|
|
export const NG1_ROOT_SCOPE = '$rootScope';
|
|
export const NG1_COMPILE = '$compile';
|
|
export const NG1_HTTP_BACKEND = '$httpBackend';
|
|
export const NG1_INJECTOR = '$injector';
|
|
export const NG1_PARSE = '$parse';
|
|
export const NG1_TEMPLATE_CACHE = '$templateCache';
|
|
export const REQUIRE_INJECTOR = '^' + NG2_INJECTOR;
|