When I try to call my "option1" file from my templates folder in the url it just shows
and it does not allow me to access my route anymore without changing the URL to
It makes the call to me correctly, I define my navigation bar as follows:
<ul>
<li><a href="#/opcion1">Opción 1</a></li>
<li><a href="#/opcion2">Opción 2</a></li>
<li><a href="#/opcion3">Opción 3</a></li>
<li><a href="#/opcion4">Opción 4</a></li>
<li><a href="#/">Inicio</a></li>
</ul>
and I make the call from AngularJS with:
var mainAplication = angular.module('herbApp', ['ngRoute']);
mainAplication.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'resources/temps/inicio.php',
controller: 'inicio'
})
.when('/opcion1', {
templateUrl: 'resources/temps/opcion1.php',
controller: 'inicio'
})
}])
I hope you can help me, I would really appreciate it.
You have to add the symbol
#!
to the url. According to commit aa077e8 , the symbol is now added!
to the url.So change:
By: