该应用具有route
"/skillss"
,而app.component.html
具有<router-outlet></router-outlet>
。
updateFromAndroid()
方法,并且该方法被成功调用,并且成功获得data
,但是在
window.location.href = "/skillss"
在Android应用中。
如何在此处布线并解决以下错误。
错误是:-
"Angular is running in the development mode. Call enableProdMode() to enable the production mode.", source: https://qa1.abc.ai/skills/vendor.js (61108).
"ERROR", source: ng:///SkillsModule/SkillsComponent.ngfactory.js (929)
"ERROR CONTEXT", source: ng:///SkillsModule/SkillsComponent.ngfactory.js (929)
"ERROR", source: https://qa1.abc.ai/skills/vendor.js (59660)
<body>
<app-root></app-root>
<script type="text/javascript">
function updateFromAndroid(data) {
alert('hi');
alert(JSON.stringify(data));
// $.jStorage.set('currentAccount', data);
window.location.href = "/skillss"
}
</script>
</body>
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));