Open hugoblanc opened 5 years ago
@hugoblanc Is app-routing.module.ts
modified instead?
Sorry for delay
nop, nothing has changed in app-routing.module.ts
import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
const routes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', loadChildren: './home/home.module#HomePageModule' }, ];
@NgModule({ imports: [ RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules }) ], exports: [RouterModule] })
export class AppRoutingModule { }
@hugoblanc I'm having the same problem. I did some tests and I believe it's some parser validation, because when my array is empty it's not added, but when I put any object in the array, the path is added. For example:
Before:
ionic generate page profile/detail --route-path=detail
Nothing happen, but after adding this:
And executing again:
ionic generate page profile/detail --route-path=detail
And it's work. My module structure is:
I think it might help us find the problem.
Description: I'm generating module with --routing option. If I generate child page to this module, routing.module.ts is marked as updated but in fact it is not.
Steps to Reproduce:
ionic start errorgene blank
cd errorgene
ionic g module todos --routing
ionic g page todos/todos-list
Output:
For the following command
ionic g page todos/todos-list
but todos-routing.module.ts is not updated
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class TodosRoutingModule { }
My
ionic info
: