Closed alejandrocao closed 11 years ago
Hi, are you running this from the file system? If so, please try again with a local web server running...
Tobias
Hi Tobias,
Yes, I'm running my samples from file system. It is not possible to do that?
I add this to my controller and now I can run the sample.
mod.config(function($locationProvider) {
$locationProvider.html5Mode(false);
});
However I also have to change my links from:
<li><a ng-href="page2/1">Option 1</a></li>
to:
<li><a ng-href="index.html#!/page2/1">Option 1</a></li>
Is it a better way to do that?
Thanks, Alejandro
Hi, no, this is the only way if you run this from a file system, as otherwise angular uses the html5 history api, which resulted in the error you saw.
Tobias
Closing this, as running from file system is not supported.
I get the following error when trying to run your sample locally.
http://jsfiddle.net/ocdemo/CE86s/