Explore
Sign In
skills/angular__angular
1
0
Fork 0
You've already forked angular__angular
mirror of https://github.com/angular/angular.git synced 2026-09-14 13:54:52 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
7bfe8aa553b7e95cdd7be9dacd42bbdfd6b55356
angular__angular/modules/@angular/upgrade/src/util.ts
T

17 lines
364 B
TypeScript
Raw Normal View History

feat(upgrade): Allow including ng2/1 components in ng1/2 Closes #3539
2015-08-06 13:19:29 -07:00
export function stringify(obj: any): string {
if (typeof obj == 'function') return obj.name || obj.toString();
return '' + obj;
}
export function onError(e: any) {
// TODO: (misko): We seem to not have a stack trace here!
console.log(e, e.stack);
throw e;
}
feat(ngUpgrade): faster ng2->ng1 adapter by only compiling ng1 once 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 }
2015-10-11 11:18:11 -07:00
export function controllerKey(name: string): string {
return '$' + name + 'Controller';
}
Reference in New Issue Copy Permalink
Version: v1.25.5 Page: 690ms Template: 8ms
Auto
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어