diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Angular.js | 2 | ||||
| -rw-r--r-- | src/Binder.js | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index a7d4f719..93ca71b4 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -276,6 +276,7 @@ function exposeMethods(obj, methods){ function wireAngular(element, config) { var widgetFactory = new WidgetFactory(config['server'], config['database']); var binder = new Binder(element[0], widgetFactory, datastore, config['location'], config); + binder.updateListeners.push(config.onUpdateView); var controlBar = new ControlBar(element.find('body'), config['server'], config['database']); var onUpdate = function(){binder.updateView();}; var server = config['database'] =="$MEMORY" ? @@ -358,6 +359,7 @@ angular['compile'] = function(element, config) { jQuery = window['jQuery']; msie = jQuery['browser']['msie']; config = _({ + 'onUpdateView': noop, 'server': "", 'location': {'get':noop, 'set':noop, 'listen':noop} }).extend(config||{}); diff --git a/src/Binder.js b/src/Binder.js index 8dac934b..4699a601 100644 --- a/src/Binder.js +++ b/src/Binder.js @@ -99,7 +99,7 @@ Binder.prototype = { scope.updateView(); var end = new Date().getTime(); this.updateAnchor(); - _.each(this.updateListeners, function(fn) {fn();}); + foreach(this.updateListeners, function(fn) {fn();}); }, docFindWithSelf: function(exp){ |
