mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 23:40:23 +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 |
||
|---|---|---|
| .. | ||
| filter | ||
| anchorScrollSpec.js | ||
| browserSpecs.js | ||
| cacheFactorySpec.js | ||
| compilerSpec.js | ||
| controllerSpec.js | ||
| cookiesSpec.js | ||
| cookieStoreSpec.js | ||
| deferSpec.js | ||
| documentSpec.js | ||
| exceptionHandlerSpec.js | ||
| httpBackendSpec.js | ||
| httpSpec.js | ||
| interpolateSpec.js | ||
| localeSpec.js | ||
| locationSpec.js | ||
| logSpec.js | ||
| parseSpec.js | ||
| qSpec.js | ||
| resourceSpec.js | ||
| routeParamsSpec.js | ||
| routeSpec.js | ||
| scopeSpec.js | ||
| snifferSpec.js | ||
| windowSpec.js | ||