Skip to content

Commit

Permalink
Merge pull request #43 from guillotinaweb/traverse-here-querystring
Browse files Browse the repository at this point in the history
Allow to traverseHere without querystring
  • Loading branch information
ebrehault authored Jul 27, 2020
2 parents 568a308 + 1f84c99 commit f155974
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 48 deletions.
107 changes: 62 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,178 +1,195 @@
# 1.7.1 (2020-07-24)

## Improvement

- Allow to traverseHere without querystring [ebrehault]

# 1.7.0 (2020-07-10)

## New feature
- Use view prefix to lazy load a module [ebrehault]

- Use view prefix to lazy load a module [ebrehault]

# 1.6.5 (2020-06-29)

## Improvement
- Upgrade to Angular 10 [ebrehault]

- Upgrade to Angular 10 [ebrehault]

# 1.6.4 (2020-06-18)

## Bug fix
- Clean up implicit any [ebrehault]

- Clean up implicit any [ebrehault]

# 1.6.3 (2020-06-01)

## Bug fix
- Allow to traverse to parent folder by going to `..` [ebrehault]

- Allow to traverse to parent folder by going to `..` [ebrehault]

# 1.6.2 (2020-05-15)

## Improvement
- Method to get query parameters easily [ebrehault]

- Method to get query parameters easily [ebrehault]

# 1.6.1 (2020-05-11)

## Bug fix
- Do not replace tile context with traversed state defined before tile instantiation [ebrehault]

- Do not replace tile context with traversed state defined before tile instantiation [ebrehault]

# 1.6.0 (2020-05-01)

## New feature
- `beforeTraverse` observable [ebrehault]

- `beforeTraverse` observable [ebrehault]

# 1.5.3 (2020-04-10)

## Improvement
- Compile lazy module on load [ebrehault]
- Fix Travis so non-tagged version can be merged [ebrehault]

- Compile lazy module on load [ebrehault]
- Fix Travis so non-tagged version can be merged [ebrehault]

## Bug fix
- Do not break if tile does not exist [ebrehault]

- Do not break if tile does not exist [ebrehault]

# 1.5.2 (2020-03-31)

- `a[traverseTo]` href with fullPath [CarlesLopezMagem]
- `a[traverseTo]` href with fullPath [CarlesLopezMagem]

# 1.5.1 (2020-03-27)

## Improvement
- `emptyTile`: method allowing to remove current component from a tile [mpellerin]

- `emptyTile`: method allowing to remove current component from a tile [mpellerin]

# 1.5.0 (2020-03-25)

### Breaking changes
- Remove the `[noAutoTraverse]` attribute, it is not needed anymore as `traverse()` will not update the location if it has been already set by Angular Router [ebrehault]

- Remove the `[noAutoTraverse]` attribute, it is not needed anymore as `traverse()` will not update the location if it has been already set by Angular Router [ebrehault]

# 1.4.3 (2020-02-27)

- Support lazy loading for tiles [ebrehault]
- Support lazy loading for tiles [ebrehault]

# 1.4.2 (2020-02-25)

- Fix when Location.back goes back to root [oggers]
- Fix when Location.back goes back to root [oggers]

# 1.4.1 (2020-02-24)

- Fix typing
- Fix typing

# 1.4.0 (2020-02-24)

- Support lazy loading [ebrehault]
- Support lazy loading [ebrehault]

# 1.3.2 (2020-02-14)

- Upgrade to Angular 9 [mathilde-pellerin]
- Upgrade to Angular 9 [mathilde-pellerin]

# 1.3.1 (2020-02-07)

- Fix change detection on traverser-outlet [mathilde-pellerin]
- Fix change detection on traverser-outlet [mathilde-pellerin]

# 1.3.0 (2020-01-28)

- Tiles support
- Tiles support

# 1.2.8 (2020-01-27)

- Fix build and upgrade to Angular 8
- Fix build and upgrade to Angular 8

# 1.2.7 (2020-01-24)

- Auto-tagging and auto-release on NPM
- Auto-tagging and auto-release on NPM

# 1.2.6 (2019-10-27)

- Fix traversing on root
- Fix traversing on root

# 1.2.5 (2019-10-16)

- Setup auto-tagging
- Setup auto-tagging

# 1.2.4 (2019-10-13)

- Fix demo and package.json
- Fix demo and package.json

# 1.2.3 (2019-09-30)

- Fix typing
- Fix typing

# 1.2.2 (2019-09-29)

- Add noAutoTraverse parameter to block traverse on location change if routing (Eric Brehault)
- Add noAutoTraverse parameter to block traverse on location change if routing (Eric Brehault)

# 1.2.1 (2019-09-26)

- Normalize path before resolving when called from outside (Mathilde Pellerin)
- Normalize path before resolving when called from outside (Mathilde Pellerin)

# 1.2.0 (2019-09-01)

- Support usage with routing (ebrehault)
- Support usage with routing (ebrehault)

# 1.1.1 (2019-06-15)

- Remove generated e2e tests (Mathilde Pellerin)
- Remove protractor, karma and jasmine dependencies (as we are using jest) (Mathilde Pellerin)
- Remove generated e2e tests (Mathilde Pellerin)
- Remove protractor, karma and jasmine dependencies (as we are using jest) (Mathilde Pellerin)

# 1.1.0 (2019-06-14)

- Upgrade angular to version 7.2.0 (Mathilde Pellerin)
- Build the project using angular cli (Mathilde Pellerin)
- Unit tests with Jest instead of Karma (Mathilde Pellerin)
- fix request header (Thomas Desvenain)
- Upgrade angular to version 7.2.0 (Mathilde Pellerin)
- Build the project using angular cli (Mathilde Pellerin)
- Unit tests with Jest instead of Karma (Mathilde Pellerin)
- fix request header (Thomas Desvenain)

# 1.0.6 (2018-09-20)

- traverseHere utility (Eric BREHAULT)
- traverseHere utility (Eric BREHAULT)

# 1.0.5 (2018-03-20)

## Bug fixes

- Fix IE support by switching from URLSearchParams to HttpParams from @angular/common/http (Sune Wøller)
- Fix IE support by switching from URLSearchParams to HttpParams from @angular/common/http (Sune Wøller)

- When we change query string but not context, we request backend. (Thomas Desvenain)
- When we change query string but not context, we request backend. (Thomas Desvenain)

# 1.0.4 (2017-11-04)

## New features

- Add querystring to target. (Thomas Desvenain)
- Add querystring to target. (Thomas Desvenain)

- Use tsconfig path mapping to configure module-name-> location for test project. (Sune Wøller)
- Use tsconfig path mapping to configure module-name-> location for test project. (Sune Wøller)

- Switch from angular/http to angular/common/http. (HttpClient) (Sune Wøller)
- Switch from angular/http to angular/common/http. (HttpClient) (Sune Wøller)

- Angular 5.0.0 compliancy. (Eric Bréhault)
- Angular 5.0.0 compliancy. (Eric Bréhault)

# 1.0.3 (2017-09-24)

## Bug fixes

- Declare Target interface and no implicit any. (Thomas Desvenain)
- Declare Target interface and no implicit any. (Thomas Desvenain)

# 1.0.2 (2017-09-06)

## Bug fixes

- Do not re-use context if empty.
- Do not re-use context if empty.

# 1.0.1 (2017-09-06)

## Bug fixes

- Preserve previous location if no context path.
- Preserve previous location if no context path.

# 1.0.0-alpha.14 (2017-05-29)

Expand Down
2 changes: 1 addition & 1 deletion projects/traversal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-traversal",
"version": "1.7.0",
"version": "1.7.1",
"license": "MIT",
"author": {
"name": "Eric Brehault",
Expand Down
5 changes: 3 additions & 2 deletions projects/traversal/src/lib/traverser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ export class Traverser {
this.emitTarget(path, contextPath, queryString, view, this.target, components);
}

traverseHere() {
this.traverse(this.location.path().slice(this.prefix.length));
traverseHere(includeHash = true) {
const here = this.location.path().slice(this.prefix.length);
this.traverse(!includeHash ? here.split('?')[0] : here);
}

addView(name: string, target: string, component: any) {
Expand Down

0 comments on commit f155974

Please sign in to comment.