I'm new to Angular JS. Here i have some doubt. I have this code:
.controller("boardController", function($scope, $http) {
$scope.models = {
selected: null,
lists: {"A": [], "B": []}
};
$http({
method : "get",
url : "/boards"
})
.then(function(response){
$scope.ajax_val = response.data;
angular.forEach($scope.ajax_val, function(value, key){
var bname = value.board_name;
$scope.models.lists.push(bname);
});
});
In this code push function returns error.. I dont know why?
Thanks Advanced!!...