| Age | Commit message (Collapse) | Author |
|
|
|
I hope this helps someone, I ran into some issues when following the API as described - handlers of this event receive 3 arguments, not 2.
Although this is mentioned [elsewhere](http://docs.angularjs.org/api/ng.$rootScope.Scope#$on) it's not clear when viewing the docs for this behaviour in isolation.
The first argument is an Event Object, not the current route. The previous route argument can also be omitted on occasions.
|
|
the `nextRoute` object available in `$routeChangeStart` handler
accidentaly leaked property which pointed to the route definition
currently being matched.
this was done just for the internal needs of the `$route` implementation
and was never documented as public api.
Some confusion arouse around why the $route property was not always
available on the `nextRoute` object (see #1907). The right thing for us
to do is to prefix the property with $$ for now and refactor the code
to remove the property completely in the future. Application developers
should use the `nextRoute` object itself rather than its `$route` property.
The main diff is that nextRoute inherits from the object referenced by $route.
BREAKING CHANGE: in $routeChangeStart event, nextRoute.$route property is gone.
Use the nextRoute object instead of nextRoute.$route.
Closes #1907
|
|
Commit 773ac4a broke support for route parameters that are not seperated
from other route parts by slashes, which this change fixes. It also adds
some documentation about path parameters to the when() method and
escapes all regular expression special characters in the URL, not just
some.
|
|
Routes like '/bar/foovalue/barvalue' matching '/bar/:foo/:bar'
now are well mapped in $routeParams to:
{bar:'barvalue', foo:'foovalue'}
Closes: #1501
Signed-off-by: Gonzalo Ruiz de Villa <gonzaloruizdevilla@gmail.com>
|
|
|
|
|
|
property on $routeProvider's route object
|
|
aftre -> after
|
|
we now have two types of namespaces:
- true namespace: angular.* - used for all global apis
- virtual namespace: ng.*, ngMock.*, ... - used for all DI modules
the virual namespaces have services under the second namespace level (e.g. ng.)
and filters and directives prefixed with filter: and directive: respectively
(e.g. ng.filter:orderBy, ng.directive:ngRepeat)
this simplifies urls and makes them a lot shorter while still avoiding name collisions
|
|
This allows location change cancelation
|
|
templates
BREAKING CHANGE: template in $route definition is now templateUrl
To migrate just rename `template` to `templateUrl`.
|
|
BREAKING CHANGE
rename $beforeRouteChange to $routeChangeStart
rename $afterRouteChange to $routeChangeSuccess
|
|
Resolve all promises on route before we fire $afterRouteChange which then renders the ngView.
|
|
|
|
|
|
|
|
Previously one had to write:
$routeProvider.when('/foo', {...});
$routeProvider.when('/bar', {...});
$routeProvider.otherwise({...});
After this change it's just:
$routeProvider.
when('/foo', {...}).
when('/bar', {...}).
otherwise({...});
Breaks #when which used to return the route definition object but now
returns self. Returning the route definition object is not very useful
so its likely that nobody ever used it.
|
|
|