Commit Graph

143 Commits

Author SHA1 Message Date
Brandon 63b82cd730 feat(router): Allow navigation without updating the URL (#9608) 2016-08-04 11:46:09 -07:00
vsavkin 422d380b3e feat(router): add queryParams and fragment to every activated route 2016-08-03 15:30:03 -07:00
vsavkin 550ab31bd0 feat(router): add parent, children, firstChild to ActivatedRoute 2016-08-03 15:30:03 -07:00
vsavkin 5fceb21549 refactor(router): remove dead code 2016-08-03 15:30:03 -07:00
vsavkin 29caa37943 feat(router): support sibling modules providing routes 2016-08-02 13:31:15 -07:00
vsavkin 3e377f520e fix(router): make an outlet to unregister itself when it is removed from the dom 2016-08-01 16:56:38 -07:00
Suguru Inatomi 0d6cc17252 fix(UrlParser): stop setting default value 'true' (#10399) 2016-07-30 14:34:03 -07:00
vsavkin 3c3e9ddb10 feat(router): add a validation to make sure pathMatch is set correctly 2016-07-29 12:27:43 -07:00
Tobias Bosch d0a95e35af refactor(testing): introduce new testing api to support ng modules
BREAKING CHANGE:
- deprecations:
  * `withProviders`, use `TestBed.withModule` instead
  * `addProviders`, use `TestBed.configureTestingModule` instead
  * `TestComponentBuilder`, use `TestBed.configureTestModule` / `TestBed.override...` / `TestBed.createComponent` instead.

Closes #10354
2016-07-29 04:47:18 -07:00
vsavkin 9d9e9c6ff1 refactor(router): take advantage of the new way of configuring modules 2016-07-27 10:24:29 -07:00
vsavkin 62e7c0f464 feat(router): implement canLoad 2016-07-26 14:39:02 -07:00
Tobias Bosch 6f4e49ed53 refactor(core): rename `precompile` into `entryComponents`.
Part of #10043

BREAKING CHANGE:
- `@Component.precompile` was renamed to `@Component.entryComponents`
  (old property still works but is deprecated)
- `ANALYZE_FOR_PRECOMPILE` was renamed to `ANALYZE_FOR_ENTRY_COMPONENTS` (no deprecations)
2016-07-26 07:04:36 -07:00
Tobias Bosch 46b212706b refactor(core): change module semantics
This contains major changes to the compiler, bootstrap of the platforms
and test environment initialization.

Main part of #10043
Closes #10164

BREAKING CHANGE:
- Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit.
  This is actually not breaking as `@AppModules` were not part of rc.4.
  We will have detailed docs on `@NgModule` separately.
- `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support).
  Use `bootstrapModule` / `bootstrapModuleFactory` instead.
- All Components listed in routes have to be part of the `declarations` of an NgModule.
  Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
2016-07-26 07:04:10 -07:00
vsavkin 6f68330fa5 feat(router): rename UrlPathWithParams into UrlSegment
BREAKING CHANGE:

UrlPathWithParams => UrlSegment
UrlSegment => UrlSegmentGroup
2016-07-25 12:15:07 -07:00
vsavkin 2b63330a36 fix(router): handle when both primary and secondary are empty-path and primary has a child 2016-07-22 18:51:35 -07:00
vsavkin 06e4ca4bb3 fix(router): advance query params and fragment after advanced routes 2016-07-22 18:51:35 -07:00
vsavkin 43437c175a fix(router): handle url fragments when no url segments present 2016-07-22 18:51:35 -07:00
vsavkin 8d90a5a4cf fix(router): router link active should take all descendants into account 2016-07-22 18:51:35 -07:00
vsavkin 93a4ca652a refactor(router): renames PRIMARY_OUTLET into primary 2016-07-22 18:51:35 -07:00
Victor Berchet 00aa7a76b6 chore(tests): enable lint, make it green. (#10224) 2016-07-21 17:12:00 -07:00
vsavkin 27b87ef535 fix(router): throw when cannot parse a url 2016-07-21 16:14:55 -07:00
vsavkin 44709e0dca fix(router): handle urls with only secondary top-level segments 2016-07-21 16:14:44 -07:00
vsavkin db54a84d14 fix(router): routerLinkActive should only set classes after the router has successfully navigated 2016-07-20 17:51:21 -07:00
vsavkin eb6ff65af7 refactor(router): makes an error message clearer 2016-07-20 14:47:51 -07:00
vsavkin 23ee29b6a2 fix(router): navigation should not preserve query params and fragment by default
BREAKING CHANGE

Previously both imperative (router.navigate) and declarative (routerLink) navigations
would preserve the current query params and fragment. This behavior turned out to
be confusing. This commit changes it.

Now, neither is preserved by default. To preserve them, you need to do the following:

router.naviage("newUrl", {preserveQueryParams: true, preserveFragment: true})

<a routerLink="newUrl" preserveQueryParams preserveFragment></a>
2016-07-20 14:30:04 -07:00
vsavkin 2799e7a3ca refactor(router): rename RouterTestModule into RouterTestingModule 2016-07-20 11:39:31 -07:00
vsavkin 921a17960c fix(router): lazy loaded components should use loaded injector 2016-07-18 17:42:04 -07:00
vsavkin 7a4f6621ed fix(router): handle lastPathIndex of empty-path routes 2016-07-18 17:42:04 -07:00
vsavkin b77a4a40a4 fix(router): expose initalNavigation and dispose so they can be used with webworkers 2016-07-14 17:29:01 -07:00
vsavkin 0668ba50e8 fix(router): freeze params and queryParams to prevent common source of bugs 2016-07-14 13:33:05 -07:00
Hiroto Fukui aa88438b54 feat(Router): add extra validation for when route was passed as Array (#9942) 2016-07-14 08:28:31 -07:00
vsavkin 85be729c70 fix(router): lazily-loaded modules should use loaded injectors instead of the root one 2016-07-13 18:25:30 -07:00
vsavkin a5dc5705a3 feat(router): guards and data resolvers can now return promises 2016-07-13 18:25:30 -07:00
vsavkin 9e3d13f61f feat(router): add support for canActivateChild 2016-07-13 18:25:30 -07:00
vsavkin 0426325ef7 fix(router): merge SystemJsAppModuleFactoryLoader and SystemJsAllModuleLoader 2016-07-13 11:16:46 -07:00
vsavkin 0b54e3cf0a fix(router): do not fire events on 'duplicate' location events 2016-07-13 11:16:46 -07:00
vsavkin 5cf58971f1 fix(router): update current state and url before activating components 2016-07-13 11:16:46 -07:00
Victor Berchet 3050ae155c feat(ICU): enable ICU extraction even when when in is not used
BREAKING CHANGES:

"{" is used a a delimiter for ICU messages then it could not be used in text nodes.
"{" should be escaped as "{{ '{' }}"

Before:

    <span>some { valid } text</span>

After:

    <span>some { invalid } text<span> <!-- throw parse error -->
    <span>some {{ '{' }} valid } text</span>
2016-07-12 16:57:39 -07:00
vsavkin ded518d47f feat(router): update routerLink DSL to handle aux routes 2016-07-12 11:44:55 -07:00
Julie Ralph 9af2d8b810 fix(testing): remove deprecated testing APIs (#9923)
See https://github.com/angular/angular/blob/master/CHANGELOG.md for
prior deprecation and how to update.
2016-07-11 16:04:32 -07:00
vsavkin 245b0910ed feat(router): add activate and deactivate events to RouterOutlet 2016-07-08 15:01:52 -07:00
vsavkin a77db44129 feat(router): empty-path routes should inherit matrix params 2016-07-08 14:48:59 -07:00
vsavkin 34b3c534e7 fix(router): disallow root segments with matrix params 2016-07-08 14:47:55 -07:00
vsavkin 96a9e66616 feat(router): add the ANALYZE_FOR_PRECOMPILE provider to make dev ergonomics better 2016-07-07 18:07:10 -07:00
vsavkin 46e105f3ab fix(router): encode/decode params and path segments 2016-07-07 17:33:42 -07:00
vsavkin f7a0e9ecb6 fix(router): fix RouterLinKActive to work with RouterLink 2016-07-07 17:33:42 -07:00
vsavkin 72544ba551 feat(router): add RouterTestModule 2016-07-07 14:28:01 -07:00
vsavkin 37e6da6dfb refactor(router): clean up naming 2016-07-06 16:19:52 -07:00
vsavkin 8ebb8e44c8 feat(router): add support for lazily loaded modules 2016-07-06 14:38:05 -07:00
vsavkin 0c65d5cf2b fix(router): handle router outlets in ngIf 2016-06-30 22:14:42 -07:00