angular-routing

What is difference between `loadChildren: () => import('./hoge.module.ts).then(m => m.HogeModule)' and loadChildren: './hoge.module#HogeModule'?

早过忘川 提交于 2020-07-20 05:37:35
问题 Issue We get an error cannot find module in case following structure. app-routing.module.ts const routes: Routes = [ { path: CHILD_MANAGEMENT_PORTAL.baseUrl, canActivate: [AuthGuard], component: EnvelopeComponent, loadChildren: () => import('./features/child-management/child-management.module').then( m => m.ChildManagementModule ), data: { menuResolver: ChildManagementMenuResolver, pageTitleResolver: ChildManagementPageTitleResolver, portalData: CHILD_MANAGEMENT_PORTAL } }, ]; @NgModule({

ionic 4 + angular: routerLink only works first time

☆樱花仙子☆ 提交于 2020-06-11 17:06:33
问题 I'm having a weird bug while developing a basic app from scratch right now. I use Ionic 4 beta 19 and I've put a routerLink to another page, the route is set up in the base pages module like so: RouterModule.forChild([ { path: '', component: NewsPage }, { path: ':id', component: DetailPage } ]) the routerLink attribute is set on a card and it works just fine when clicking on a card, but when I go back and press that same card or another one, the router just doesn't do anything at all. I don't

Angular Breadcrumb based on navigation history instead of route path

故事扮演 提交于 2020-05-16 01:23:52
问题 Is there a way to implement navigation history based breadcrumb instead of normal route path based breadcrumb. example Route : Home - HChild1 - HChild1.1 Home - HChild2 - HChild2.1 If user navigates to HChild2.1 from Home page breadcrumb should be Home | HChild2.1 instead of Home | HChild2 | HChild2.1 Then if user navigates to HChild1.1 from HChild2.1 then breadcrumb should be Home | HChild2.1 | HChild1.1 instead of Home | HChild1.1 | HChild1.1 what I have is normal route path based

Angular Breadcrumb based on navigation history instead of route path

跟風遠走 提交于 2020-05-16 01:23:27
问题 Is there a way to implement navigation history based breadcrumb instead of normal route path based breadcrumb. example Route : Home - HChild1 - HChild1.1 Home - HChild2 - HChild2.1 If user navigates to HChild2.1 from Home page breadcrumb should be Home | HChild2.1 instead of Home | HChild2 | HChild2.1 Then if user navigates to HChild1.1 from HChild2.1 then breadcrumb should be Home | HChild2.1 | HChild1.1 instead of Home | HChild1.1 | HChild1.1 what I have is normal route path based

How to load a new view in the current view?

北城以北 提交于 2020-05-14 09:00:11
问题 I have angular 8 and a link that will create a new view. The current link is like this: http://localhost:4200/en/dossier/06637e72-8915-4735-9400-4ef7705194ea and the new view is like this: http://localhost:4200/en/dossier/06637e72-8915-4735-9400-4ef7705194ea/item/new/Interview But so I want that: ...\item/new/Interview will be loaded in the same view as: So replaced http://localhost:4200/en/dossier/06637e72-8915-4735-9400-4ef7705194ea So that the new will not be loaded in a totally new view.

Children routing not working and application redirects to the 404 page

只谈情不闲聊 提交于 2020-05-13 09:05:38
问题 I have created an angular application version 7 and project structure is like this. app module have app-routing.module.ts and dashboard module have dashboard-routing module.ts. In dashboard module, the layout component route has child components namely home and admin. Here is my code: AppModule import { AppRoutingModule } from './app-routing.module'; import { DashboardModule } from './dashboard/dashboard.module'; import { AppComponent } from './app.component'; import { LoginComponent } from '

Children routing not working and application redirects to the 404 page

空扰寡人 提交于 2020-05-13 09:05:23
问题 I have created an angular application version 7 and project structure is like this. app module have app-routing.module.ts and dashboard module have dashboard-routing module.ts. In dashboard module, the layout component route has child components namely home and admin. Here is my code: AppModule import { AppRoutingModule } from './app-routing.module'; import { DashboardModule } from './dashboard/dashboard.module'; import { AppComponent } from './app.component'; import { LoginComponent } from '

Children routing not working and application redirects to the 404 page

ぃ、小莉子 提交于 2020-05-13 09:05:20
问题 I have created an angular application version 7 and project structure is like this. app module have app-routing.module.ts and dashboard module have dashboard-routing module.ts. In dashboard module, the layout component route has child components namely home and admin. Here is my code: AppModule import { AppRoutingModule } from './app-routing.module'; import { DashboardModule } from './dashboard/dashboard.module'; import { AppComponent } from './app.component'; import { LoginComponent } from '

Angular 6 build, Error 404 Not Found when refresh page

|▌冷眼眸甩不掉的悲伤 提交于 2020-03-18 06:19:42
问题 I have facing a problem 404 page not found in production build when refresh a page. Build working fine with # routing RouterModule.forRoot(routes, { useHash: true }) . But I want a pretty route without # My module look like @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpClientModule, CoreModule, AppRoutingModule, AuthModule ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, multi: true } ], bootstrap: [AppComponent] }) 回答1:

Angular 6 build, Error 404 Not Found when refresh page

落爺英雄遲暮 提交于 2020-03-18 06:19:10
问题 I have facing a problem 404 page not found in production build when refresh a page. Build working fine with # routing RouterModule.forRoot(routes, { useHash: true }) . But I want a pretty route without # My module look like @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpClientModule, CoreModule, AppRoutingModule, AuthModule ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, multi: true } ], bootstrap: [AppComponent] }) 回答1: