@republikwebid wrote:
app
.state('app.lowongan', {
url: '/lowongan/:lowonganId',
views: {
'menuContent': {
templateUrl: 'templates/lowongan.html',
controller: 'LowonganCtrl'
}
}
});controller
`.controller('LowonganCtrl', function($scope, $http, $stateParams) {
$http.get('http://localhost/loker_web/api/pekerjaan/'+stateParams.lowonganId).success(function(data) {
console.log(data);
$scope.lowongan = data;
});})`
Any can help me because i get error message "stateParams is not defined" for my code,
Thanks before
Posts: 2
Participants: 2