Navigation is not working in my app,why

The below methods are not showing in my code.
am unable to understand why?
not only those, but soo many methods also are not showing in my app.

this.navCtrl.navigateRoot('/support');
this.navCtrl.navigateForward('/products/12');
this.navCtrl.navigateBack('/products');

my ionic info is

Ionic:

Ionic CLI : 5.4.8 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.4
@ionic/app-scripts : 3.2.3

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 6.2.3, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, (and 8 other plugins)

Utility:

cordova-res : not installed
native-run : 0.2.8 (update available: 0.3.0)

System:

Android SDK Tools : 26.1.1 (/Users/sathguru/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v10.13.0 (/usr/local/bin/node)
npm : 6.13.2
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

SO please help me.
thanks

You need to update ionic angular to 4+.
npm rm @ionic/angular --save
npm install @ionic/angular --save

It is not updating ionic-angular to 4+. it is showing same information as above after I did removing and adding of ionic angular.please help me.

ionic-angular = Ionic v3, uses Angular 5
@ionic/angular = Ionic v4, uses Angular 8

While it’s not nearly as earth-shattering a change as going from Ionic v1/AngularJS 1 (which requires a complete app rewrite), that shift isn’t completely transparent, either, and I wouldn’t recommend doing that upgrade in place.

OP: what do you mean by “methods not showing”, and what is motivating you to use things that aren’t in the documentation of whatever Ionic version you are trying to use? Are you following some blog or have you bought some starter app or something?

Hi, Thanks for the reply. I bought some starter app and working since 3 months. My application is in ionic 3, that time for navigation I used push and pop. Now in ionic 4 we have routing concept. So I am implemented routing concept. It is working fine. But problem is am Unable to navigate back. For example I have Home screen and About screen, Iam able to move Home screen to about screen but am unable to move back to home screen. So that time, I am trying to navigate by using navctrl.navigateBack() methods but these methods are not showing. So Please guide me how to navigate back.

I did ng version,It is displaying below details

ng version

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 8.3.19
Node: 10.13.0
OS: darwin x64
Angular: 7.2.11
… animations, common, compiler, core, forms, http
… platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.803.19 (cli-only)
@angular-devkit/build-optimizer 0.0.35
@angular-devkit/core 7.3.7
@angular-devkit/schematics 7.3.7
@angular/cdk 7.3.6
@angular/compiler-cli 8.2.14
@angular/flex-layout 7.0.0-beta.24
@angular/material 7.3.6
@schematics/angular 8.3.19 (cli-only)
@schematics/update 0.803.19 (cli-only)
rxjs 6.4.0
typescript 3.3.4000
webpack 3.12.0

So from these information m angular version is 7.2.11??
Guide me please

You can inject Angular’s Location. It has a back() method.

Any sample ?
Thanks.