mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
Componet -> Component
This commit is contained in:
@ -505,7 +505,7 @@ export class NavController extends Ion {
|
|||||||
* @private
|
* @private
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
createViewComponetRef(type, hostProtoViewRef, viewContainer, viewCtrlBindings) {
|
createViewComponentRef(type, hostProtoViewRef, viewContainer, viewCtrlBindings) {
|
||||||
let bindings = this.bindings.concat(viewCtrlBindings);
|
let bindings = this.bindings.concat(viewCtrlBindings);
|
||||||
|
|
||||||
// the same guts as DynamicComponentLoader.loadNextToLocation
|
// the same guts as DynamicComponentLoader.loadNextToLocation
|
||||||
|
@ -195,11 +195,11 @@ export class Nav extends NavController {
|
|||||||
// the component being loaded is an <ion-tabs>
|
// the component being loaded is an <ion-tabs>
|
||||||
// Tabs is essentially a pane, cuz it has its own navbar and content containers
|
// Tabs is essentially a pane, cuz it has its own navbar and content containers
|
||||||
let contentContainerRef = this._viewManager.getViewContainer(this.anchorElementRef());
|
let contentContainerRef = this._viewManager.getViewContainer(this.anchorElementRef());
|
||||||
let viewComponetRef = this.createViewComponetRef(componentType, hostProtoViewRef, contentContainerRef, this.getBindings(viewCtrl));
|
let viewComponentRef = this.createViewComponentRef(componentType, hostProtoViewRef, contentContainerRef, this.getBindings(viewCtrl));
|
||||||
viewComponetRef.instance._paneView = true;
|
viewComponentRef.instance._paneView = true;
|
||||||
|
|
||||||
viewCtrl.disposals.push(() => {
|
viewCtrl.disposals.push(() => {
|
||||||
viewComponetRef.dispose();
|
viewComponentRef.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
viewCtrl.onReady().then(() => {
|
viewCtrl.onReady().then(() => {
|
||||||
@ -210,9 +210,9 @@ export class Nav extends NavController {
|
|||||||
// normal ion-view going into pane
|
// normal ion-view going into pane
|
||||||
this.getPane(structure, viewCtrl, (pane) => {
|
this.getPane(structure, viewCtrl, (pane) => {
|
||||||
// add the content of the view into the pane's content area
|
// add the content of the view into the pane's content area
|
||||||
let viewComponetRef = this.createViewComponetRef(componentType, hostProtoViewRef, pane.contentContainerRef, this.getBindings(viewCtrl));
|
let viewComponentRef = this.createViewComponentRef(componentType, hostProtoViewRef, pane.contentContainerRef, this.getBindings(viewCtrl));
|
||||||
viewCtrl.disposals.push(() => {
|
viewCtrl.disposals.push(() => {
|
||||||
viewComponetRef.dispose();
|
viewComponentRef.dispose();
|
||||||
|
|
||||||
// remove the pane if there are no view items left
|
// remove the pane if there are no view items left
|
||||||
pane.totalViews--;
|
pane.totalViews--;
|
||||||
@ -226,10 +226,10 @@ export class Nav extends NavController {
|
|||||||
|
|
||||||
// a new ComponentRef has been created
|
// a new ComponentRef has been created
|
||||||
// set the ComponentRef's instance to this ViewController
|
// set the ComponentRef's instance to this ViewController
|
||||||
viewCtrl.setInstance(viewComponetRef.instance);
|
viewCtrl.setInstance(viewComponentRef.instance);
|
||||||
|
|
||||||
// remember the ElementRef to the content that was just created
|
// remember the ElementRef to the content that was just created
|
||||||
viewCtrl.viewElementRef(viewComponetRef.location);
|
viewCtrl.viewElementRef(viewComponentRef.location);
|
||||||
|
|
||||||
// get the NavController's container for navbars, which is
|
// get the NavController's container for navbars, which is
|
||||||
// the place this NavController will add each ViewController's navbar
|
// the place this NavController will add each ViewController's navbar
|
||||||
|
@ -155,17 +155,17 @@ export class Tab extends NavController {
|
|||||||
|
|
||||||
loadContainer(componentType, hostProtoViewRef, viewCtrl, done) {
|
loadContainer(componentType, hostProtoViewRef, viewCtrl, done) {
|
||||||
|
|
||||||
let viewComponetRef = this.createViewComponetRef(componentType, hostProtoViewRef, this.contentContainerRef, this.getBindings(viewCtrl));
|
let viewComponentRef = this.createViewComponentRef(componentType, hostProtoViewRef, this.contentContainerRef, this.getBindings(viewCtrl));
|
||||||
viewCtrl.disposals.push(() => {
|
viewCtrl.disposals.push(() => {
|
||||||
viewComponetRef.dispose();
|
viewComponentRef.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
// a new ComponentRef has been created
|
// a new ComponentRef has been created
|
||||||
// set the ComponentRef's instance to this ViewController
|
// set the ComponentRef's instance to this ViewController
|
||||||
viewCtrl.setInstance(viewComponetRef.instance);
|
viewCtrl.setInstance(viewComponentRef.instance);
|
||||||
|
|
||||||
// remember the ElementRef to the content that was just created
|
// remember the ElementRef to the content that was just created
|
||||||
viewCtrl.viewElementRef(viewComponetRef.location);
|
viewCtrl.viewElementRef(viewComponentRef.location);
|
||||||
|
|
||||||
// get the NavController's container for navbars, which is
|
// get the NavController's container for navbars, which is
|
||||||
// the place this NavController will add each ViewController's navbar
|
// the place this NavController will add each ViewController's navbar
|
||||||
|
Reference in New Issue
Block a user