1
Il ne fonctionne pas avec le templateURL spécifié: test.html mais fonctionne si vous spécifiez le modèle: 'Bonjour'angularjs ng-route. fonctionne pas templateURL
TRAVAIL
app.config(function($routeProvider){
$routeProvider
.when('/test', {
template: '<h1>home</h1>',
controller: 'ctrl'
})
// .otherwise({
// redirectTo: '/home',
// controller: 'ProductCtrl'
// });
});
NE TRAVAILLEZ
app.config(function($routeProvider){
$routeProvider
.when('/test', {
templateUrl: 'test.html',
controller: 'ctrl'
})
// .otherwise({
// redirectTo: '/home',
// controller: 'ProductCtrl'
// });
});
et j'ai un signe !
dans le chemin d'accès au fichier qui est #!/test
LINK
<a style="color:white;" href="#!/test">Go</a>
J'utilise nw.js
montrent la structure de votre dossier dans lequel vous mettez votre fichier test.html – jitender
Refer this https://stackoverflow.com/questions/40635098/angularjs-routing-with-templateurl –