Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Next, we set up a "watch" function to be triggered any time the panelDetails property on our scope is changed to be a . If the object is non-empty object. When invoked, the function clears , then populates , the panel with data, and makes displays it visible.

Code Block
languagejs
// update the panel's contents when the data is changed
scope.$watch('panelDetails', function () {
    if (!fs.isEmptyObject(scope.panelDetails)) {
        panel.empty();
        populatePanel(panel);
        panel.show();
    }
}); 

...