470 Commits

Author SHA1 Message Date
Jason Aden
de795ea233 perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015
code, providing an initial optimization that we couldn't previously get just from Uglify. Uses
Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
2017-02-21 20:48:55 -08:00
Miško Hevery
738d93caf7 refactor: rewrite private export using the ɵ prefix 2017-02-21 20:48:55 -08:00
Victor Berchet
c2d5f203a5 Revert "feat(router): add an option to rerun guards and resolvers when query changes"
This reverts commit c2e0f71a78368482be4b86a60c773cc9385ad190.
2017-02-20 19:48:43 -08:00
Victor Berchet
670f2eca00 Revert "fix(router): do not finish bootstrap until all the routes are resolved ()"
This reverts commit 2a191cae2dff9b2616d4e7a4d47ae2ffb2cdf15d.
2017-02-20 19:48:23 -08:00
Victor Berchet
2a191cae2d fix(router): do not finish bootstrap until all the routes are resolved ()
Fixes 
closes 
2017-02-20 18:37:38 -08:00
vsavkin
c2e0f71a78 feat(router): add an option to rerun guards and resolvers when query changes
Closes 
Closes 
2017-02-20 18:01:51 -08:00
Victor Berchet
5f3c8441e4 refactor(router): misc
closes 
2017-02-20 16:19:20 -08:00
Victor Berchet
78e8814103 feat(router): add RouteConfigLoadStart and RouteConfigLoadEnd events 2017-02-20 16:19:05 -08:00
Dzmitry Shylovich
7df6f46c1c feat(router): introduce RouteConfigLoaded event
Closes 
2017-02-20 16:19:05 -08:00
Ward Bell
5129e8e47c docs(router): fix typo in canLoad interface doc comment () 2017-02-18 14:28:45 -08:00
Dzmitry Shylovich
b36f60c74c docs(router): fix broken link ()
Closes 
2017-02-16 11:32:17 -08:00
Victor Berchet
57461e9ed7 docs(router): fix guards API docs () 2017-02-16 10:26:53 -08:00
Chuck Jazdzewski
724ca373e7 build: produce metadata bundles for @angular modules ()
Closes 
2017-02-16 08:15:30 -08:00
Alex Eagle
b9d293af03 build: first pass of de-duplicating tsconfig.json content ()
PR Close 
2017-02-09 14:32:40 -08:00
Alex Eagle
ef32e6b0d0 fix: build and test fixes for TS 2.1 () 2017-02-08 11:32:40 -06:00
NFM
d0366542fb docs(router): fix typos ()
PR Close 
2017-02-07 12:45:14 -06:00
Miško Hevery
69a4bb0bcd doc: standardize deprecation of preserveQueryParams (4.0 only) ()
PR closes 
2017-02-01 16:48:19 -08:00
evan Liu
c87c3bec93 feat(router): deprecate preserveQueryParams,add queryParamsHandling ()
PR Close 
2017-01-31 15:43:25 -06:00
Dzmitry Shylovich
ff290af38c fix(common): introduce isObservable method ()
Closes 

PR Close 
2017-01-31 12:14:19 -06:00
Dzmitry Shylovich
579567ca79 fix(router): fix CanActivateChild guard provided in a lazy loaded module ()
Closes 

PR Close 
2017-01-29 12:17:03 -06:00
Dzmitry Shylovich
47d41d492b fix(router): fix navigation from the root component ngOnInit hook ()
Closes 

PR Close 
2017-01-29 12:16:12 -06:00
Dzmitry Shylovich
e075b1ba83 fix(router): fix CanActivate redirect to the root on initial load ()
Closes 

PR Close 
2017-01-29 12:15:46 -06:00
Nuno Arruda
0854a5dea4 style(docs): update copyright years () 2017-01-27 20:47:14 -08:00
Igor Minar
da41a954b5 docs: branding fixes ()
Angular 1.x -> AngularJS
Angular 1 -> AngularJS
Angular1 -> AngularJS
Angular 2+ -> Angular
Angular 2.0 -> Angular
Angular2 -> Angular

I have deliberately not touched any of the symbol names as that would cause big merge collisions with Tobias's work.

All the renames are in .md, .json, and inline comments and jsdocs.

PR Close 
2017-01-27 15:03:11 -06:00
Peter Bacon Darwin
e35c25d2ce docs(router): remove invalid jsdoc tags ()
The `@selector` tags are not valid.
Dgeni should be able to extract this information
from the directive annotation metadata.
2017-01-26 23:46:38 -08:00
Jonathan Adamski
0589f93e41 Fixed documentation reference to canActivate in canDeactivate ()
Simple update to code sample which references canActivate: ['canDeactivateTeam'].
2017-01-20 14:19:23 -08:00
Dzmitry Shylovich
635bf02b02 fix(router): enable loadChildren with function in aot ()
Closes 
2017-01-18 15:56:34 -08:00
Dzmitry Shylovich
e8ea741039 fix(router): routerLinkActive should not throw when not initialized ()
Fixes 

PR Close 
2017-01-17 18:38:45 -06:00
Dzmitry Shylovich
1a92e3d406 refactor(router): clean up RouterLinkActive ()
PR Close 
2017-01-17 18:37:34 -06:00
Miško Hevery
d169c2434e feat(core): Add type information to injector.get() ()
- Introduce `InjectionToken<T>` which is a parameterized and type-safe
  version of `OpaqueToken`.

DEPRECATION:
- `OpaqueToken` is now deprecated, use `InjectionToken<T>` instead.
- `Injector.get(token: any, notFoundValue?: any): any` is now deprecated
  use the same method which is now overloaded as
  `Injector.get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T): T;`.

Migration
- Replace `OpaqueToken` with `InjectionToken<?>` and parameterize it.
- Migrate your code to only use `Type<?>` or `InjectionToken<?>` as
  injection tokens. Using other tokens will not be supported in the
  future.

BREAKING CHANGE:
- Because `injector.get()` is now parameterize it is possible that code
  which used to work no longer type checks. Example would be if one
  injects `Foo` but configures it as `{provide: Foo, useClass: MockFoo}`.
  The injection instance will be that of `MockFoo` but the type will be
  `Foo` instead of `any` as in the past. This means that it was possible
  to call a method on `MockFoo` in the past which now will fail type
  check. See this example:

```
class Foo {}
class MockFoo extends Foo {
  setupMock();
}

var PROVIDERS = [
  {provide: Foo, useClass: MockFoo}
];

...

function myTest(injector: Injector) {
  var foo = injector.get(Foo);
  // This line used to work since `foo` used to be `any` before this
  // change, it will now be `Foo`, and `Foo` does not have `setUpMock()`.
  // The fix is to downcast: `injector.get(Foo) as MockFoo`.
  foo.setUpMock();
}
```

PR Close 
2017-01-17 15:34:54 -06:00
Julien Elbaz
d4d3782d45 feat(Router): call resolver when upstream params change ()
With this change the resolver is called when the parameter for the activated and any parent routes change.
ie, switching from `/teams/10/players/5` to `/teams/12/players/5` will now trigger any `PlayerResolver`.
2017-01-09 18:56:58 -05:00
Dzmitry Shylovich
46cb04d575 fix(router): throw an error when navigate to null/undefined path
Closes 

Fixes 
2017-01-09 18:56:47 -05:00
Victor Berchet
6d29faefea fix(Router): fix checking for object intersection 2017-01-09 16:30:14 -05:00
Dzmitry Shylovich
d9a22dae4f fix(router): RouterLink mirrors input target as attribute
Closes 
2017-01-09 15:00:40 -05:00
Misko Hevery
31322e73b7 fix: correctly show error when karma fails to load 2017-01-06 19:30:09 -05:00
Dzmitry Shylovich
07e0fce8fc fix(router): update route snapshot before emit new values ()
Closes 
2016-12-27 15:57:22 -08:00
Dzmitry Shylovich
0eca960494 fix(router): fix lazy loaded module with wildcard route ()
Closes 
2016-12-27 15:22:57 -08:00
Victor Berchet
eed83443b8 chore(tslint): update tslint to 4.x () 2016-12-27 14:55:58 -08:00
Dzmitry Shylovich
69fa3bbc03 feat(router): add an extra argument to CanDeactivate interface ()
Adds a `nextState` argument to access the future url from `CanDeactivate`.

BEFORE:

    canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean>|Promise<boolean>|boolean;

AFTER:

    canDeactivate(component: T, currentRoute: ActivatedRouteSnapshot, currentState: RouterStateSnapshot, nextState?: RouterStateSnapshot): Observable<boolean>|Promise<boolean>|boolean;

Closes 
2016-12-27 14:08:06 -08:00
Dzmitry Shylovich
174334dec3 fix(router): routerLink support of null/undefined ()
Closes 
2016-12-27 13:45:16 -08:00
Victor Savkin
eb2ceff4ba fix(router): should reset location if a navigation by location is successful ()
Closes 
2016-12-21 12:47:58 -08:00
crisbeto
171a9bdc85 feat: update to rxjs@5.0.1 and unpin the rxjs peerDeps via ^5.0.1 ()
Now that rxjs is stable and the rxjs team follows semver, we can update and unpin the dependency safely.

From now on the Angular application/library developers are in charge of controlling the rxjs version as long as it's newer than 5.0.1.

closes 
closes 
closes 
2016-12-19 16:24:53 -08:00
Dzmitry Shylovich
a006c1418a feat(router): routerLink add tabindex attribute ()
Fixes 
2016-12-09 15:38:50 -08:00
Victor Berchet
c8baf51f4f style: clang-format the code 2016-12-09 11:19:55 -08:00
Victor Berchet
b5c4bf1c59 refactor(router): misc refactoring () 2016-12-09 10:44:46 -08:00
Victor Berchet
5c6ec20c7e refactor(router): simplify regexp
closes 
closes 
2016-12-08 18:43:17 -08:00
Andy Howell
440ef02f29 fix(router): add support for query params with mulitple values
closes 
2016-12-08 18:42:58 -08:00
Jónatan Núñez
9591a08dfb fix(router): Use T type in Resolve interface () 2016-12-08 11:24:38 -08:00
Miško Hevery
16efb13dd1 fix: display framework version on bootstrapped component () 2016-12-06 16:21:07 -08:00
Dzmitry Shylovich
2893c2c0a2 fix(router): validate nested routes ()
Fixes 
2016-12-06 10:41:01 -08:00