Merge branch 'alpha50' into css-refactor

This commit is contained in:
Adam Bradley
2015-12-09 07:47:30 -06:00
27 changed files with 71 additions and 49 deletions

View File

@@ -84,8 +84,8 @@ export class NavRouter extends RouterOutlet {
// generate a componentInstruction from the view's PathRecognizer and params
let componentInstruction = pathRecognizer.generate(viewCtrl.params.data);
// create an Instruction from the componentInstruction
let instruction = new Instruction(componentInstruction, null);
// create a ResolvedInstruction from the componentInstruction
let instruction = new ResolvedInstruction(componentInstruction, null);
this._parentRouter.navigateByInstruction(instruction);
}
@@ -113,3 +113,16 @@ export class NavRouter extends RouterOutlet {
}
}
// TODO: hacked from
// https://github.com/angular/angular/blob/6ddfff5cd59aac9099aa6da5118c5598eea7ea11/modules/angular2/src/router/instruction.ts#L207
class ResolvedInstruction extends Instruction {
constructor(public component: ComponentInstruction, public child: Instruction,
public auxInstruction: {[key: string]: Instruction}) {
super();
}
resolveComponent(): Promise<ComponentInstruction> {
return Promise.resolve(this.component);
}
}

View File

@@ -136,8 +136,8 @@ export class Nav extends NavController {
/**
* @private
*/
onInit() {
super.onInit();
ngOnInit() {
super.ngOnInit();
if (this.root) {
if (typeof this.root !== 'function') {