I was having many confusion about the project structure and how to maintain the code...(,production level) this video give clean n clear explanation about the same..! Not only about route gaurd Thank you sir..,!
Hi Srinivas Tamada, viewed both videos. Thanks for these videos, I think you missed explaining adding Auth guard in Lazy loading. The routing code I am using, putting comments, this will be much help if you explain guard in this routing. Main routes: const routes: Routes = [ { path: 'admin', loadChildren: './_views/_admin/_module/admin.module#AdminModule'}, { path: '', loadChildren: './_views/_frontend/_module/frontend.module#FrontendModule' }, { path: '**', component: PageNotFoundComponent } ]; //////////// Sub routes import { AuthGuard } from './../../../_auth/auth.guard'; const routes: Routes = [ { path: '', component: AdminComponent, children: [ { path: 'login', loadChildren: '../_views/_pages/_login/_module/login.module#LoginModule'}, { path: 'dashboard', loadChildren: '../_views/_pages/_dashboard/_module/dashboard.module#DashboardModule' }, { path: 'add-post', loadChildren: '../_views/_pages/_post/_add-post/_module/add-post.module#AddPostModule' }, { path: '', redirectTo: 'login', pathMatch: 'full' } ]} ]; ********** This is how I have used lazy loading *****************
Sir, video is good. You know, I'm working on mean stack application. I want to do the similar thing, in my app. But all the login information should be stored in my database. Also i want login/signup using google. Can you please make a video on that or please share any link which i can go through. Thanks in Advance