123456789101112131415161718192021 |
- (function(){
- app.controller('Authors', ['$scope', 'books.repository', '$routeParams','utils', function ($scope, booksRepository, $routeParams, utils){
- booksRepository.getAuthors()
- .then(function(respons){
- $scope.authors = respons.data
- },function(error){
- utils.notify({
- message: error.statusText,
- type: 'danger'
- })
- })
- $scope.deleteAuthor = function(id){
- $scope.authors.splice($scope.authors.indexOf(id), 1)
- };
- // utils.notify({
- // message: 'her na lob',
- // type: 'danger'
- // })
-
- }])
- })();
|