ng-style or style attribute with binding? Which is better? Which is faster? What is the difference?

后端 未结 2 1447
青春惊慌失措
青春惊慌失措 2021-01-01 09:38

I am optimizing my large application. I am confused between following two approach, please help to decide which one is faster.

Inline style attributes

2条回答
  •  無奈伤痛
    2021-01-01 10:05

    One time bind is available after Angular 1.3.

    You can do this way without depending on third-party libraries:

    I didn't measure the performance, but I'm pretty sure that its better than without the colons.

提交回复
热议问题