Open ivaaaan opened 9 years ago
search.factory('Search', function($resource) { return { search: $resource('/api/search/?text=:text&sorted=:sorted', {}, { get: { method: "GET", isArray: true } }) } });
In template:
cg-busy="[promise]"
Directive:
search.directive('sort', [ function () { return { restrict: 'A', link: function($scope, element, attrs) { element.bind('click', function() { $scope.sorted = attrs.type; $scope.searchTracks(); }); } } } ]);
If I call the search of the template - it works, but if the directive - no
+1
In template:
Directive:
If I call the search of the template - it works, but if the directive - no