1
新的一頁
顯示內容,我通過點擊按鈕,試圖掌握詳細的導航從給定的數據主細節CONTROLL不
page1.html
<a class="button icon button-block button-calm icon-right ion-android-arrow-dropright-circle" ng-class="{'button-balanced': file.status == 'open', 'button-assertive': file.status == 'closed'}" href="#filedetails" ng-repeat="file in file | orderBy:'-status'" ng-click="onSelectFile(n)" >File Ref No:{{file.num}}<br>
Description:{{file.descript}}<br>
Status:{{file.status}}</a><br>
page2.html
<div class="col">: {{file.num}}</div>
<div class="col">: {{file.casedet}}</div>
查看詳細
控制器頁面
.controller('caseFileCtrl', function($scope,$http,$location) {
$scope.file=[
{num:"1",descript:"consumer",status:"closed",casedet:"cleared"},
{num:"2",descript:"literal",status:"open", casedet:"process"},
{num:"3",descript:"literal",status:"closed", casedet:"cleared"},
{num:"4",descript:"consumer",status:"open",casedet:"proess"}
];
$scope.onSelectFile = function(n)
{
$location.url('/casefile/'+ n.num);
}
})
.controller('fileDetailsCtrl', function($scope,$stateParams) {
$scope.file={num:$stateParams.num, casedet:'file'+$stateParams.casedet};
})
我不能提前
救了我謝謝:) – yousuf