Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

stateParams is not defined

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>