You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project is quite simple, I'm using Laravel 5 as my back-end framework and I'm doing a simple $http request in a service with AngularJS, I'm receiving the data all fine but when assigning to tree_data, the View(the front) is not updating properly (only one column of the data is shown), I've debugged and the problem is that the call of the tree-grid-directive.js occurs only the first time the page is loaded, Is it suppose to update automatically right? or Am I doing something wrong?
angular.module('treeGridTest', ['treeGrid'])
.controller('treeGridController', ['$scope', 'TableService',
function ($scope, TableService)
{
var self = this;
self.tableShow = false;
var tree;
self.fetchTable = function () {
TableService.list().then(
function (resp) {
self.rawTreeData = resp.data;
$scope.loading = false;
$scope.tree_data = self.rawTreeData;
self.tableShow = true;
},
function (respError) {
console.log(respError);
});
};
self.fetchTable();
$scope.tree_data = [{ empty: "Empty" }];
}])
.factory('TableService', ['$http', function ($http)
{
return {
list: function () {
return $http.get('/api/tables/' + 'ventasporproductos');
}
};
}]);
Could you please post an example where you change the value of tree_data dynamically with an or something, because I just did something like that and is not updating the table.
Thanks in advance
The text was updated successfully, but these errors were encountered:
jpacareu
changed the title
The view is not tree_data is not updating whenever I make a change in my controller
The view is not updating whenever I make a change on tree_data
Aug 4, 2017
I am also having the same issue. I am using AngularJS and initializing the tree_data with an empty array in the beginning. Then I am getting the data using a $http GET and assigning to tree_data. The first column shows (key column) up and all remaining columns are NOT. I have to show quantity date wise and the input data is in the correct format. When I assign the same array in the controller code, it works but not via $http GET assignment.
Hi guys:
My project is quite simple, I'm using Laravel 5 as my back-end framework and I'm doing a simple $http request in a service with AngularJS, I'm receiving the data all fine but when assigning to tree_data, the View(the front) is not updating properly (only one column of the data is shown), I've debugged and the problem is that the call of the tree-grid-directive.js occurs only the first time the page is loaded, Is it suppose to update automatically right? or Am I doing something wrong?
Could you please post an example where you change the value of tree_data dynamically with an or something, because I just did something like that and is not updating the table.
Thanks in advance
The text was updated successfully, but these errors were encountered: