mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 15:40:22 +00:00
Problems: - controller was instantiated immediately on $afterRouteChange (even if no content), that's different compare to ng:controller, which instantiates controllers after compiling - route listened on current scope ($afterRouteChange), so if you were listening on $rootScope ($afterRouteChange), you get called first and current.scope === undefined, which is flaky - route handles scope destroying, but scope is created by ng:view - route fires after/before route change even if there is no route (when no otherwise specified) Solution: - route has no idea about scope, whole scope business moved to ng:view (creating/destroying) - scope is created (and controller instantiated) AFTER compiling the content - that means on $afterRouteChange - there is no scope yet (current.scope === undefined) - added $contentLoaded event fired by ng:view, after linking the content |
||
|---|---|---|
| .. | ||
| jstd-scenario-adapter | ||
| scenario | ||
| service | ||
| widget | ||
| angular-mocksSpec.js | ||
| AngularSpec.js | ||
| ApiSpecs.js | ||
| BinderSpec.js | ||
| directivesSpec.js | ||
| InjectorSpec.js | ||
| jqLiteSpec.js | ||
| jquery_alias.js | ||
| jquery_remove.js | ||
| jQueryPatchSpec.js | ||
| JsonSpec.js | ||
| loaderSpec.js | ||
| markupSpec.js | ||
| matchers.js | ||
| ResourceSpec.js | ||
| sanitizerSpec.js | ||
| ScenarioSpec.js | ||
| testabilityPatch.js | ||
| widgetsSpec.js | ||