Skip to content

Instantly share code, notes, and snippets.

@asicfr
Created February 22, 2013 13:41
Show Gist options
  • Save asicfr/5013444 to your computer and use it in GitHub Desktop.
Save asicfr/5013444 to your computer and use it in GitHub Desktop.
sous controleur et methodes du crud
// author Controllers
bookStoreauthor.controller('AuthorListCtrl', ['$scope', '$location', '$routeParams', '$rootScope', 'ApiAuthor', 'ApiStorage', function ($scope, $location, $routeParams, $rootScope, ApiAuthor, ApiStorage) {
$rootScope.logMe("AuthorListCtrl");
var self = this;
$scope.authors = ApiAuthor.search();
$rootScope.logMe("search end");
// new Author call
$scope.openCreateAuthorPage = function () {
$rootScope.logMe("openCreateAuthorPage");
$location.path("/author/create");
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment