AngularJS ng-style not changing with property

后端 未结 2 1884
感情败类
感情败类 2021-02-04 14:14

I cant seem to figure out why the style property is not getting updated. In my larger application it seems to work fine.

angular.module(\'Model\', [])
    .fact         


        
2条回答
  •  误落风尘
    2021-02-04 14:33

    You had assigned the width and height values to the myprop style field on a one-off basis. So when you changed the width or height the myprop was not changing.

    Change the myprop value to a function that computes its value instead...

    http://jsfiddle.net/DyHHJ/

提交回复
热议问题