Is there a way to update the results of an AngularJS $resource query without refreshing the entire page?
Here is what my current page looks like:
<div class="container" ng-controller="AppController">
<div ng-repeat="tile in items">
<p>{{tile.name}}</p>
</div>
<button ng-click='??'> Reload tiles </button>
</div>
This is the controller I am using:
(function(angular) {
var AppController = function($scope, Item) {
Item.query(function(response) {
$scope.items = response ? response : [];
});
};
AppController.$inject = ['$scope', 'Item'];
angular.module("myApp.controllers").controller("AppController", AppController);
}(angular));
As a beginner with AngularJS, I have been struggling to find a solution to this problem. Any guidance or assistance would be greatly appreciated. Thank you!