diff options
| author | Igor Minar | 2010-10-12 05:31:32 +0800 | 
|---|---|---|
| committer | Misko Hevery | 2010-10-13 04:37:45 +0800 | 
| commit | 7e47a2d016676f37287203f26689cce1ee1eaa0c (patch) | |
| tree | edd2e2d9e9e00e451dd6a06345b1717d1e4ab1fd /src/Scope.js | |
| parent | 3bd4abba6bb4c1f8312e25a3d87fbfefcd218e0d (diff) | |
| download | angular.js-7e47a2d016676f37287203f26689cce1ee1eaa0c.tar.bz2 | |
temparary backaward compatibility patch for Controller.init
- feedback relies on *Controller.init to be called when a Controller is
being created. this with previous angular refactoring this is not happening
in angular any more. To make it easier for feedback to transition, this
change makes $become call controller's init method if present.
- call to Controller.init from $route.updateRoute was removed. this was
left there by accident during the previous refactoring.
Diffstat (limited to 'src/Scope.js')
| -rw-r--r-- | src/Scope.js | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/src/Scope.js b/src/Scope.js index 53228a0d..3aaff361 100644 --- a/src/Scope.js +++ b/src/Scope.js @@ -233,6 +233,11 @@ function createScope(parent, services, existing) {          behavior[name] = bind(instance, fn);        });        (Class || noop).call(instance); + +      //TODO: backwards compatibility hack, remove when Feedback's init methods are removed +      if (behavior.hasOwnProperty('init')) { +        behavior.init(); +      }      }    }); | 
