How to create custom angular filter without angular app name?
// usual way for creating filter
var app = angular.module('app', []);
app.filter('makeUppercase', function () {
return function (item) {
return item.toUpperCase();
};
});
app.controller('PersonCtrl', function () {
this.username = 'Todd Motto';
});
I only know creating angular filters with app name.
My concern is how we can create a filter without app name and inject it into a controller. Does it possible to create a javascript function and pass these to controller.