5 Replies Latest reply: Feb 5, 2015 7:02 AM by Shane Porter RSS

    Extension Dev: Call function once when custom property changes



      Let's say I have an extension, with a custom property, 'app'.


      When the value of 'app' changes, I want to call a function once and once only. 


      I'm using AngularJS in my extension, and the function is relatively expensive (so I don't want to keep calling it in paint() or resize() or call it directly from the template.


      My current solution means that the code is only called once when the extension is loaded, and any changes to the property mean a refresh is required to update things - not an ideal situation.