Hey, I’ve read up on a bunch of resources about the change to the angular routing system. I’m having the worst of time trying to use goForward in a function. In fact, I’ve tried executing it in html and have had the same results. I would click the element, nothing will happen. Sometimes, if I refresh the page, the page will appear. The funny thing is, is that it works perfectly fine with goRoot. I don’t know if I’m missing anything different, but it sounds to me, this should’ve been a simple replace of the old push functionality.
Here is my function to change path:
coinDetails(coin) {
var path = '/home/details/' + coin;
this.navCtrl.goForward(path);
}
Nothing happens when this function is called. No message in the error console.
This is my routing file:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'home/details/:symbol', loadChildren: './pages/coin-details/coin-details.module#CoinDetailsPageModule' },
{ path: 'MarketCap', loadChildren: './pages/market-cap/market-cap.module#MarketCapPageModule' },
{ path: 'watchlist-configuration', loadChildren: './pages/watchlist-configuration/watchlist-configuration.module#WatchlistConfigurationPageModule' },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
Using ionic v.1.1, really at a lost how to move forward. I’ll really appreciate assistance.