I have the following partial:
<table ng-controller="WebsitesController">
<tbody>
<tr ng-repeat="website in websites.data">
<td>{{website.name}}</td>
<td>{{website.url}}</td>
</tr>
</tbody>
</table>
And this is my controller:
myApp.controller('WebsitesController', function($scope, $http) {
$http({
method: 'GET',
url: config.serverUrl + '/websites'
}).then(function successCallback(response) {
$scope.websites = response.data.message;
});
});
I successfuly load data into my view with this.
But Let's say I want to add "Delete" for each of the items. After the delete process - how is it possible to refresh the list without refreshing the page?
I'm assuming that putting the GET call in a "re-usable" function is included in the process, right?