Deployment Angular App Errors

I have a problem regarding the deployment on my angular app.
Basically what i discovered is that the routes are not working because of this error :

Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.

This error appeared after i removed the base href="/" line from the index.html like i saw on a tutorial made form angular apps with backendless.
After i provide the target url in the app.module.ts with ‘/’ in start it gives me another error but if i provide the url with ‘/<APP_ID>/<JS_KEY>/<path_to_files>/’ is rendering only the static components, in my case were the footer and header because i declared them in the app.component.hrml but the is not working at all with no error. The only error i encountered is that is not gettting the logo from the assets.

Any ideea what is happening? and why is not rendering my routes?

I followed the tutorial steps again and again for about 100 times at least but didn’t found any clue.

Hello @Cezar_Palagesiu

Are you sure to remove the base href?
The <base href="/"> tells the Angular router what is the static part of the URL. The router then only modifies the remaining part of the URL.
In our tutorials a have not found this advice to delete the base href.
‘/<APP_ID>/<JS_KEY>/<path_to_files>/’ it is should be full URL, is not it?


1 Like