angularjs - Angular 2.0 router navigation not working on iOS WKWebView -


because of performance issues, i'm trying upgrade angularjs2/phonegap app use wkwebview on ios.

unfortunately, calls route navigate not work. includes routerlink , this.route.navigate calls. there no errors being thrown. has else seen and/or perhaps have workaround?

the code works fine using normal uiwebview.

i'm relative newbie angular suggestions welcomed.

here's of relevant code looks like:

import { component } "@angular/core"; import { routes, router, activatedroute } "@angular/router"; import { loggedincallback } "./service/cognito.service";  export class homecomponent implements loggedincallback {  constructor(public router:router){ }  isloggedin(message:string, isloggedin:boolean) {     if (isloggedin){       this.router.navigate(['/home/cl']);     }     else {       console.log('homecomponent: '+message);     } } 

routing module:

import { ngmodule } '@angular/core'; import { browsermodule } '@angular/platform-browser'; import { formsmodule } '@angular/forms'; import { routes, routermodule } '@angular/router'; import { categorylistcomponent } './categorylist/categorylist.component';   const approutes: routes = [     {          path: 'home/cl',          component: categorylistcomponent     },     ... ]; @ngmodule({   declarations: [   ],   imports: [routermodule.forroot(approutes),          browsermodule,          formsmodule],   exports: [routermodule]  }) export class approutingmodule { } 

in response comment below:

as mentioned, phonegap app, of references using (i assume) file: protocol. however, first page loads okay, , references content within single javascript file. odd thing of other router-referenced content in same javascript file.

i hoping understand nuts , bolts of router behavior explain why doesn't work in environment.

are accessing through web server or file:// protocol? seems wkwebview has issues that.

see article


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -