Answer the question
In order to leave comments, you need to log in
Link not generated from id?
Why does clicking on a link go to the main page?
But when you enter the address adres/#/detaileddis:%7B%7Binfo.id%7D%7D into the address bar, everything works and goes to the desired page.
var myApp = angular.module('myApp', ["ngRoute"])
myApp.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider){
$routeProvider.when('/', {
templateUrl:'template/home.php',
controller:'homeCtrl'
});
$routeProvider.when('/detaileddis:{{info.id}}', {
templateUrl:'template/detaileddis.php',
controller:'detaileddisCtrl'
});
$routeProvider.otherwise({redirectTo: '/'});
}]);
<td><a data-ng-href="#/detaileddis:{{info.id}}">{{info.id}}</a></td>
Answer the question
In order to leave comments, you need to log in
$routeProvider.when('/detaileddis/:infoId', {
<td><a data-ng-href="#/detaileddis/{{info.id}}">{{info.id}}</a></td>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question