Zrobiłem filtr, aby dodać antyklasę po wartości, jeśli inna podana wartość nie jest pusta i chciałbym oddzielić ten tekst od pozostałej części z
. W rzeczywistości sam filtr działa, ale w prawo ciąg " " jak na stronie.Angular js - Zwraca łańcuch znaków ze znacznikami HTML, takimi jak
angular.module('ngMod', []).
filter('antislash', function() {
return function(input) {
if(input==null || input.length === 0){
return null;
}else{
return ' / ';
}
}
});
Wyświetlane na stronie: /
istnieje odpowiednik filtra html lub coś?