angular.module("Prometheus.directives").directive('ngChanged', function() {
  return {
    restrict: "A",
    link: function(scope, element, attrs) {
      element.bind("change", function() {
        scope.$eval(attrs.ngChanged);
      });
    }
  };
});

angular.module("Prometheus.directives").directive('ngChanged', function() {
  return {
    restrict: "A",
    link: function(scope, element, attrs) {
      element.bind("change", function() {
        scope.$apply(attrs.ngChanged);
      });
    }
  };
});

Use $apply() in ngChanged to immediately propagate model changes.
Use $apply() in ngChanged to immediately propagate model changes.

Otherwise, if ngChanged was used to refresh after changes in frame URLs, the
frame was only reloaded after triggering a second AngularJS dirty checking
cycle.
