After library is included to your project we can create custom angular filter that we are planing to use later in html or in controlers
angular.module('myAngularApp')
.filter('text', function() {
return function(input, format) {
return textural(input).format(format);
}
});
$scope.myModel = 'exampleText'
{{ myModel | text:'snake' }}
$scope.test = $filter('text')($scope.myModel, 'snake');
// example_text