Angular equivalent of jQuery $.map?

前端 未结 2 909
难免孤独
难免孤独 2021-01-03 18:02

I\'m transitioning from relying on jQuery to building apps in AngularJS. It\'s recommended in a number of places to not mix jQuery and Angular code.

One thi

2条回答
  •  一生所求
    2021-01-03 18:41

    No, there is no equivalent in Angular. And as you discovered, no you don't need to fall back to writing imperative code.

    Instead, just use the map function that is built directly into JavaScript. If you need to support IE8, insert the polyfill at the beginning of your scripts.

提交回复
热议问题