mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
use injector instead of passing params
This commit is contained in:
@ -15,20 +15,14 @@ export class ViewController {
|
||||
|
||||
constructor(
|
||||
parentViewCtrl: ViewController,
|
||||
compiler: Compiler,
|
||||
elementRef: ElementRef,
|
||||
loader: DynamicComponentLoader,
|
||||
injector: Injector
|
||||
) {
|
||||
|
||||
this.parent = parentViewCtrl;
|
||||
this.compiler = compiler;
|
||||
this.elementRef = elementRef;
|
||||
this.loader = loader;
|
||||
this.injector = injector;
|
||||
|
||||
// TODO: Make this generic?
|
||||
this.ele = elementRef.nativeElement;
|
||||
this.compiler = injector.get(Compiler);
|
||||
this.loader = injector.get(DynamicComponentLoader);
|
||||
this.injector = injector;
|
||||
|
||||
this.items = [];
|
||||
this.navCtrl = new NavController(this);
|
||||
|
Reference in New Issue
Block a user