I got this expression in my index.html:
{{place.file.name()}}
it contains a String like tfss-24af16c3-df1f-4c35-a1e1-281bd3af7c7a-Flightreservation.pdf.
I want to cut the first 42 characters by a filter:
{{place.file.name() | sliceFileName}}
The filter is this:
.filter('sliceFileName', function() {
return function(input) {
return input.slice(42);
}
})
And it works. However, the console prints:
[Error] Error: undefined is not an object (evaluating 'input.slice')
I read somewhere that input is either trueor false (don't know if it is correct). But it works as if input is the string.
Why does it still output an error?