angular.js - How to define such a getter in the controller
仅有的幸福
仅有的幸福 2017-05-15 17:12:09
0
1
701

The purpose is to get an attribute on the scope. However, this attribute is fetched asynchronously in the service and then synchronized to the scope. If I add this getter method to html, why will it be executed multiple times?~

仅有的幸福
仅有的幸福

reply all(1)
曾经蜡笔没有小新

Run the getter method in the callback after the request is completed, and put it after the data is synchronized to the scope

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template