12345678910111213 |
- angular.module("noteWrangler")
- .controller("NotesIndexController", ['$scope', 'Note', function ($scope, Note) {
- const errorHandler = function (err) {
- console.log("Error getting /notes", err);
- };
- const responseHandler = function (data) {
- $scope.notes = data.data;
- };
- Note.all()
- .then(responseHandler, errorHandler);
- }]);
|