use injector instead of passing params

This commit is contained in:
Adam Bradley
2015-06-27 14:42:09 -05:00
parent edbcf9f834
commit f21802ba87
4 changed files with 6 additions and 20 deletions

View File

@ -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);