我有两条路线,如下面的代码(角度js分页的第二条路线):
Route::get('history/{fixassid}',function (){
return view('assetmanagement.history.pchistory');
});
Route::get('/api/v1/pchists/','HistoryController@getpc_his');
My Angular js
var app = angular.module('angtable', ['angularUtils.directives.dirPagination'])
.constant('API_URL', 'http://testing/mypro/public/api/v1/');
app.controller('pchistory', function ($scope, $http, API_URL) {
$scope.currentPage=1;
$scope.itemsPerPage=10;
$scope.sizes = [ {code: 0, name: '5'}, {code: 1, name: '10'}, {code: 2, name: '15'}, {code: 3, name: '20'}, {code: 4, name: '30'} ];
$scope.update = function() {
//console.log($scope.item.code, $scope.item.name)
$scope.itemsPerPage= $scope.item.name;
}
//retrieve employees listing from API
$http.get(API_URL + "pchists")
.success(function (response) {
$scope.pchists = response;
});
$scope.sort = function (keyname) {
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
});
当我点击刀片temaplate
时<a href="{{url('history/'.$get_history_pc->fixass_id)}}">( View History )</a>
我想将fixassid传递给控制器HistoryController并且函数getpc_his怎么可以?