How to import router from @angular/router in ionic


I have import {Router, ActivatedRoute, Params} from '@angular/router'; in my app.module.ts .

When I import

imports: [ 
       { enableTracing: true }

I’m getting error as

Cannot find name ‘appRoutes’.

I’m new to this topic. Can someone help me?


You might want to wait for Ionic 4, because the Angular router can’t be used with earlier versions.