
committed by
Igor Minar

parent
f48b343af1
commit
0f5c70d563
@ -85,25 +85,25 @@ export function main() {
|
||||
let element: angular.IAugmentedJQuery;
|
||||
|
||||
class mockScope implements angular.IScope {
|
||||
$new() { return this; };
|
||||
$new() { return this; }
|
||||
$watch(exp: angular.Ng1Expression, fn?: (a1?: any, a2?: any) => void) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$on(event: string, fn?: (event?: any, ...args: any[]) => void) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$destroy() {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$apply(exp?: angular.Ng1Expression) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$digest() {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$evalAsync(exp: angular.Ng1Expression, locals?: any) {
|
||||
return () => {};
|
||||
};
|
||||
}
|
||||
$$childTail: angular.IScope;
|
||||
$$childHead: angular.IScope;
|
||||
$$nextSibling: angular.IScope;
|
||||
@ -155,7 +155,7 @@ export function main() {
|
||||
return new DowngradeComponentAdapter(
|
||||
element, attrs, scope, ngModel, parentInjector, $injector, $compile, $parse,
|
||||
componentFactory, wrapCallback);
|
||||
};
|
||||
}
|
||||
|
||||
beforeEach((inject([Compiler], (inject_compiler: Compiler) => {
|
||||
compiler = inject_compiler;
|
||||
@ -190,4 +190,4 @@ export function main() {
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ export function main() {
|
||||
|
||||
@Component({selector: 'ng2', template: 'test'})
|
||||
class Ng2 {
|
||||
};
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [Ng2],
|
||||
@ -2746,7 +2746,7 @@ export function main() {
|
||||
it('should export ng1 instance to ng2', async(() => {
|
||||
@NgModule({imports: [BrowserModule]})
|
||||
class MyNg2Module {
|
||||
};
|
||||
}
|
||||
|
||||
const adapter: UpgradeAdapter = new UpgradeAdapter(MyNg2Module);
|
||||
const module = angular.module('myExample', []);
|
||||
|
@ -105,7 +105,7 @@ export function main() {
|
||||
default:
|
||||
throw new Error('Called too many times! ' + JSON.stringify(changes));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ng1Module.directive('ng2', downgradeComponent({
|
||||
@ -576,7 +576,7 @@ export function main() {
|
||||
|
||||
@Component({template: ''})
|
||||
class LazyLoadedComponent {
|
||||
constructor(public module: NgModuleRef<any>){};
|
||||
constructor(public module: NgModuleRef<any>) {}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
|
Reference in New Issue
Block a user