Having an issue that needs addressing.
app.controller('groupConfigCntrl', ['$http', '$scope', '$routeParams', function($http, $scope, $routeParams){
var id = $routeParams.id,
info = {};
$http.post("/g/getGroup/", {id: id}).success(function(data) {
$scope.info = data;
});
console.log($scope.info);
});
The problem at hand is that $scope.info appears to be undefined.
$http.post("/g/getGroup/", {id: id}).success(function(data) {
$scope.info = data;
console.log($scope.info);
});
In this instance, $scope.info does contain some data. Wondering why $scope behaves like a local variable? Seeking help as the binding of data in views is not functioning properly. However, it works in a similar controller.
Working Controller:
app.controller('groupCntrl', ['$http', '$scope', '$uibModal', '$routeParams', '$location', function($http, $scope, $uibModal, $routeParams, $location){
var id = $routeParams.id;
$http.post("/g/getGroup/", {id: id}).success(function(data) {
$scope.info = data;
});
})