去掉尾部的符号
html:
<td class="td_limit">
{[item.group | myfilter]}
</td>
js:
myBaseApp.filter('myfilter', function() {
return function(value) {
if (!value) { return; } //加了这一句是为了防止报错 Cannot read property 'slice' of undefined
return value =value.slice(0,value.length-1)
}
});
效果:hello world ! ==>hello world