0
私はangularjsで新しいです。私はアンカータグを使っていくつかのデータを持つインデックスページを持っています。ユーザーが特定のアンカータグページをクリックすると、リストページとデータ表示にリダイレクトされますが、ngRouteは動作しません。文字列値。どこで間違った
これは私のインデックスページangularjs ngroute not working
<div class="all_cat" ng-repeat="state in statelist">
<h2>{{state.Statename}}</h2>
<div class="cat-col-4" ng-repeat="citylist in state.city">
<ul>
<li><i class="fa fa-caret-right"></i><a href="/Job/JobList/{{citylist.ID}}">{{citylist.cityname}} </a>({{citylist.jobcount}})</li>
</ul>
</div>
<div class="clear"></div>
</div>
であり、これは
var app = angular.module('angularTable', ['ngSanitize', 'ui.select', 'angularTrix', 'ngRoute']);
app.config(function($routeProvider) {
debugger;
$routeProvider
.when('/JobList:ID', {
templateUrl: 'job/JobList.cshtml',
controller: 'joblist'
})
});
app.controller('joblist', function($scope, $routeParams) {
debugger;
$scope.message = 'Clicked person name from home page should be display here';
$scope.person = $routeParams.ID;
});
私が間違って行うスタンドの下にはないです
あなたは '/ JOBLIST /たい場合があります:代わりに'/JOBLISTのID':ID' – taguenizy
同じ問題$ routeParams.IDは –
に定義されていない、あなたは '$ルートを試してみました。 current.params'またはそれに類するもの? – taguenizy