tag to be present!" I do not know how to solve this ca...">

How to solve the error "[$ location: nobase] $ location in HTML5 mode requires a <base> tag to be present!"

I do not know how to solve this case.

Error: [$ location: nobase] $ location in HTML5 mode requires a tag for presence! http://errors.angularjs.org/1.5.7/ $ location / nobase at angular.js: 68 in $ LocationProvider. $ get (angular.js: 13384) at Object.invoke (angular.js: 4709) in angular.js: 4508 when getService (angular.js: 4655) when injecting Args (angular.js: 4679) in Object.invoke (angular .js: 4701) on angular.js: 4508 on getService (angular.js: 4655) when injecting Args (angular.js: 4679)

+4
source share
1 answer

This happens if you installed html5mode, for example:

$locationProvider.html5Mode({
 enabled: true,
 requireBase: false
});

Just add the tag to your HTML template, for example:

<head>
 <base href="/">
 ...
</head>

This is the same as mentioned in the docs here: https://docs.angularjs.org/error/ $ location / nobase

+6
source

Source: https://habr.com/ru/post/1658154/


All Articles