Angular JS 'Startswith' custom filter

前端 未结 3 1135
滥情空心
滥情空心 2020-12-10 12:49

So I\'ve been trying a while to make a custom filter that searches for the \'Startswith\' parameters rather than the \'Contains\'. Every filter that I\'ve written haven\'t s

3条回答
  •  爱一瞬间的悲伤
    2020-12-10 13:28

    Now pure javascript itself has the startsWith() method on strings. But it will not be supported by IE11.

    See here:

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith

提交回复
热议问题