Commit Graph

15 Commits

Author SHA1 Message Date
Olivier Combe 0f5c70d563 build: update npm dependencies (#19328)
PR Close #19328
2017-09-22 13:20:52 -07:00
Victor Berchet cf269d9ff4 refactor: add license header to JS files & format files (#12081) 2016-10-04 20:39:20 -07:00
Chuck Jazdzewski 43d3a84df3 Revert "refactor: add license header to JS files & format files (#12035)"
This reverts commit 8310c91823.
2016-10-04 14:06:41 -07:00
Victor Berchet 8310c91823 refactor: add license header to JS files & format files (#12035) 2016-10-04 13:15:49 -07:00
David Reher 9b1b5b393d fix(angular1_router): ngLink should not throw an error if routeParams are undefined (#8460)
If routeParams are undefined, no href attribute should be rendered. This matches the behaviour of ngHref.
2016-05-20 09:48:03 -07:00
Peter Bacon Darwin fb6d791ce9 test(angular1_router): check that link generation works with baseHref
Closes #7489
2016-03-22 02:19:09 +00:00
Peter Bacon Darwin 0f8efce799 fix(angular1_router): support link generation with custom hashPrefixes 2016-03-22 02:19:09 +00:00
David Reher 69c1405196 fix(angular_1_router): ng-link is generating wrong hrefs
At the moment ng-link is generating html5mode URLs for `href`s.
Instead it should check whether or not html5mode is enabled and create
the `href`s accordingly. The renaming in the `getLink` function is
aligning it to `RouterLink`'s `_updateLink`.

Closes #7423
2016-03-22 02:19:09 +00:00
Brandon Roberts 11e8aa26f6 feat(angular1_router): Add ng-link-active class to active ng-link
Closes #6882
2016-03-04 09:30:58 +00:00
Peter Bacon Darwin a1c3be21ec fix(angular1_router): rename `$route` service to `$rootRouter`
The singleton service that represents the top level router was called
`$router` but this is confusing since there are actually lots of routers,
which depend upon where you are in the DOM. This is similar to the situation
with scopes.

This commit clarifies this singleton by renaming it to `$rootRouter`.

BREAKING CHANGE:

The `$router` injectable service has been renamed to `$rootRouter`
2016-02-24 21:15:34 +00:00
Vamsi V 7d83959be5 refactor(router): rename "as" to "name" in RouteConfig
BREAKING CHANGE:

This is a rename to make routing concepts easier to understand.

Before:

```
@RouteConfig([
  { path: '/', component: MyCmp, as: 'Home' }
])
```

After:

```
@RouteConfig([
  { path: '/', component: MyCmp, name: 'Home' }
])
```

Closes #4622

Closes #4896
2015-10-29 10:52:55 -07:00
Brian Ford 5205a9e65f refactor(angular_1_router): use directives for route targets
BREAKING CHANGE:

Previously, route configuration took a controller constructor function as the value of
`component` in a route definition:

```
$route.config([
  { route: '/', component: MyController }
])
```

Based on the name of the controller, we used to use a componentMapper service to
determine what template to pair with each controller, how to bind the instance to
the $scope.

To make the 1.x router more semantically alligned with Angular 2, we now route to a directive.
Thus a route configuration takes a normalized directive name:

```
$route.config([
  { route: '/', component: 'myDirective' }
])
```

BREAKING CHANGE:

In order to avoid name collisions, lifecycle hooks are now prefixed with `$`. Before:

```
MyController.prototype.onActivate = ...
```

After:

```
MyController.prototype.$onActivate = ...
```

Same for `$canActivate` (which now lives on the directive factory function),
`$canDeactivate`, `$canReuse`, and `$onDeactivate` hooks.
2015-09-21 12:13:07 -07:00
Brian Ford cb4a9a3c04 refactor(router): use CamelCase aliases for routes 2015-09-14 22:46:02 -07:00
Brian Ford acc2722cb8 refactor(router): rename navigate and navigateInstruction methods 2015-09-11 17:17:45 -07:00
Brian Ford 64ffd9e99c refactor(router): split 1.x tests into separate files 2015-08-24 20:55:50 +00:00