mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
Fix view container stuff
This commit is contained in:
@ -4,7 +4,7 @@ import {
|
|||||||
Decorator,
|
Decorator,
|
||||||
Viewport,
|
Viewport,
|
||||||
View,
|
View,
|
||||||
ViewContainer,
|
ViewContainerRef,
|
||||||
//ProtoViewRef,
|
//ProtoViewRef,
|
||||||
onDestroy,
|
onDestroy,
|
||||||
Ancestor,
|
Ancestor,
|
||||||
@ -17,7 +17,6 @@ import {NavController} from 'ionic/components/nav/nav-item';
|
|||||||
import {raf} from 'ionic/util/dom';
|
import {raf} from 'ionic/util/dom';
|
||||||
import {Platform} from 'ionic/platform/platform';
|
import {Platform} from 'ionic/platform/platform';
|
||||||
|
|
||||||
|
|
||||||
// FYI for later:
|
// FYI for later:
|
||||||
// https://github.com/angular/angular/commit/3aac2fefd7f93c74abfa5ee58aa0ea8d4840b519
|
// https://github.com/angular/angular/commit/3aac2fefd7f93c74abfa5ee58aa0ea8d4840b519
|
||||||
|
|
||||||
@ -32,7 +31,7 @@ import {Platform} from 'ionic/platform/platform';
|
|||||||
export class Toolbar {
|
export class Toolbar {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
viewContainer: ViewContainer,
|
viewContainer: ViewContainerRef,
|
||||||
//protoViewRef: ProtoViewRef,
|
//protoViewRef: ProtoViewRef,
|
||||||
elementRef: ElementRef,
|
elementRef: ElementRef,
|
||||||
@Ancestor() navCtrl: NavController,
|
@Ancestor() navCtrl: NavController,
|
||||||
@ -144,7 +143,7 @@ export class ToolbarTitle {
|
|||||||
})
|
})
|
||||||
export class ToolbarContainer {
|
export class ToolbarContainer {
|
||||||
constructor(
|
constructor(
|
||||||
viewContainer: ViewContainer,
|
viewContainer: ViewContainerRef,
|
||||||
element: NgElement
|
element: NgElement
|
||||||
) {
|
) {
|
||||||
this.viewContainer = viewContainer;
|
this.viewContainer = viewContainer;
|
||||||
@ -154,7 +153,7 @@ export class ToolbarContainer {
|
|||||||
set toolbar(bar: Toolbar) {
|
set toolbar(bar: Toolbar) {
|
||||||
if (bar) {
|
if (bar) {
|
||||||
// TODO create with correct context
|
// TODO create with correct context
|
||||||
this.viewContainer.create(-1, bar.viewContainer.defaultProtoView, bar.elementRef.elementInjector);
|
this.viewContainer.create(-1, bar.viewContainer._defaultProtoView, bar.elementRef.elementInjector);
|
||||||
console.log('creating viewportContainer', performance.now())
|
console.log('creating viewportContainer', performance.now())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user