Ionic3, differences between NavController and Nav, from the 'ionic-angular' package

in the ionic bond doc, I have a NavController:

https://ionicframework.com/docs/api/navigation/NavController/

import { Component, ViewChild } from '@angular/core';
import { NavController } from 'ionic-angular';

@Component({
   template: '<ion-nav #myNav [root]="rootPage"></ion-nav>'
})
export class MyApp {
   @ViewChild('myNav') nav: NavController

and in my ionic3 project installing "ionic launch myionic3" with the template "super", app.component.ts have:

...
import { Platform, Nav, Config } from 'ionic-angular';
...
export class MyApp {
  public rootPage: any = LoginPage;

  @ViewChild(Nav) nav: Nav;
...

why there are differences, the site of the ionic document is out of date?

+4
source share
1 answer

Looking at the source on Github, with a cursory glance it seems that Nav is a reassignment of NavController. Config has many comments for describing properties. I would expect something on my blog about this .. Maybe this is inevitable ..

Update: , , : . Nav

0

Source: https://habr.com/ru/post/1680482/


All Articles