Can I use filters inside ngIf statement

后端 未结 1 1184
萌比男神i
萌比男神i 2021-01-14 01:14

Is there a way to use filter inside a ng-if statement ?

for example:

   
&
1条回答
  •  太阳男子
    2021-01-14 01:59

    Yes that works. Here's a plunkr: http://plnkr.co/edit/vpCzutMnEFlTWC9gceU3?p=preview

    angular.module('plunker').filter('two', function() {
      return function (input) { return 2; }
    });
    

    Equivalent of your code:

    Hello

    So your problem must be elsewhere.

    0 讨论(0)
提交回复
热议问题