Posts

Showing posts with the label angular-routing

how to render a javascript files after a view is render in Angular

how to render a javascript files after a view is render in Angular I am new to angular and this is first time working with angular.js . I am trying to build an single page application in angular which has the following pages All my pages have jquery script to handle modal popup form submission etc. All of them work, but when i render those pages with ng-view inside index.html. Those script doesn't work,. They do not render as well. ng-view Can anyone please tell me how can i fix this issue or if there is any other way of doing the same keeping those jquery functions. Here is my file structure Index.html <html> ...... <header> <script src="<ANGULAR.JS>"></script> <script src="<ANGULAR ROUTE.JS"></script> <script src="<JQUERY>"></script> <script defer src="<OTHER SCRIPTS>"></script> </header> <body> <ng-view></ng-view> </bo...

error:`runtime compiler is not loaded` in aot mode

error:`runtime compiler is not loaded` in aot mode In my angular 6 project I want to define all routes of DashboardModule as a children of profile route in AppModule like below code DashboardModule profile AppModule RouterModule.forRoot([ { path: '', component: HomeComponent }, { path: 'profile', loadChildren: () => DashboardModule } this code run with JIT compiler (while aot:false in angular.json file) but giving runtime compiler is not loaded error with AOT compiler( while aot:true ). aot:false angular.json aot:true so my question is, is there any way to load DashboardModule's routes as a children of profile route in AppModule without lazy loading DashboardModule ? DashboardModule's AppModule DashboardModule By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that you...