You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
648 B

'use strict';
angular.module('app.travel', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/travel/:travelid', {
templateUrl: 'views/travel/travel.html',
controller: 'TravelCtrl'
});
}])
.controller('TravelCtrl', function($scope, $http, $routeParams) {
$scope.travel = {};
$http.get(urlapi + 'travels/id/' + $routeParams.travelid)
.then(function(data, status, headers, config) {
console.log('data success');
console.log(data);
$scope.travel = data.data;
}, function(data, status, headers, config) {
console.log('data error');
});
});