I am developing an application using Angular 2 with a corridor. I used Angular cli to create the application. Now, I have run into some startup routing problems when it comes to iOS application. The underlying href is assumed to be erroneous. If I install base href using: <base href="/" target="_blank"> application does not load. If the base href is installed when I download the application using: ...,provide(APP_BASE_HREF, {useValue:'/'}), ... application loads, but I get the following exception:
EXCEPTION: Error: not available (in promise): error: routes cannot match: 'Var / containers / Bundle / Application / 3C8966ED-7DDD-4309-8C18-10B778C5AE15 / test.app / WWW'
Therefore, the application cannot function properly, as there are critical files that do not load at the beginning of the application. For android, I ran into the same problem, but I found a solution to install the base href in the next question, a solution for Android. Has anyone encountered this problem and got a solution?
Edit: I solved the problem using the following: <base href="./" target="_blank"> in the html index and removing provide(APP_BASE_HREF, {useValue:'/'}) . So, I have to set the base href change depending on whether I am deploying an application for Android or ios.
source share