Answer the question
In order to leave comments, you need to log in
How to add data stored in $scope using jQuery?
How can jQuery or AngularJS add data that is stored in $scope? I have a table, links are stored in the first column, when you click on the link, under this line the table should be loaded with data from the database that I saved to the $scope?...
Answer the question
In order to leave comments, you need to log in
If when you click on the link your data is already in $scope - use the add. variable.
Let's say you already have a layout for this data, you just put it in the right place and put ng-show="circumstance", and when loading the data, make $scope.circumstance = true.
Well, do not forget to use ng-binding or ng-model, on occasion.
Usage example:
in the controller body:
$http.get('/some/data/').success(function(loadedData){
$scope.scopeData = loadedData;
...
$scope.successLoad = true;
})
<input type="text" ng-model="scopeData" ng-show="successLoad"></input>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question