Is there a way to include filters in AngularJs services?
I've been experimenting
app.factory('educationService', [function($rootScope, $filter) {
// ..... Some code
// What I want
console.log(dateFilter(new Date(), 'yyyy-MM-01'));
// ..... Some code
}]);
I am curious if it's possible to inject a filter into a service or if there is another method to access it.
If you have any documentation on this topic, I would greatly appreciate it :) I have searched the Angular docs but haven't found anything useful so far.
Thanks :)