Skip to content

WIP: feat(router): support regular expression route paths#7126

Closed
petebacondarwin wants to merge 43 commits into
angular:masterfrom
petebacondarwin:custom-url-matchers
Closed

WIP: feat(router): support regular expression route paths#7126
petebacondarwin wants to merge 43 commits into
angular:masterfrom
petebacondarwin:custom-url-matchers

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

This is for @btford to look at and comment on...

@petebacondarwin petebacondarwin added feature Label used to distinguish feature request from other issues cla: yes state: WIP comp: router effort2: days labels Feb 17, 2016
@googlebot
Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@naomiblack
Copy link
Copy Markdown
Contributor

@petebacondarwin can you update with status? we'd like to land this ahead of other router work so you don't end in refactoring hell. My understanding is this is on your to-do list, to resolve some remaining issues with Dart.

@naomiblack naomiblack assigned petebacondarwin and unassigned btford Feb 26, 2016
@petebacondarwin
Copy link
Copy Markdown
Contributor Author

Indeed - I have fixes almost ready to upload to GitHub right now.

On 26 February 2016 at 18:47, Naomi Black notifications@github.com wrote:

@petebacondarwin https://github.com/petebacondarwin can you update with
status? we'd like to land this ahead of other router work so you don't end
in refactoring hell. My understanding is this is on your to-do list, to
resolve some remaining issues with Dart.


Reply to this email directly or view it on GitHub
#7126 (comment).

@electricBonfire
Copy link
Copy Markdown

+1
I haven't looked through the commit but I am in favor of this feature!
I am trying to add datatype requirements to the route params as described here: #7321

petebacondarwin and others added 11 commits February 26, 2016 22:29
The current router is passed to the current component via a binding.
To indicate that this is an angular provided object, this commit
renames the binding to `$router`.

BREAKING CHANGE:

The recently added binding of the current router to the current component
has been renamed from `router` to `$router`.

So now the recommended set up for your bindings in your routed component
is:

```js
{
  ...
  bindings: {
    $router: '<'
  }
}
```
The current router is passed to the current component via a binding.
To indicate that this is an angular provided object, this commit
renames the binding to `$router`.

BREAKING CHANGE:

The recently added binding of the current router to the current component
has been renamed from `router` to `$router`.

So now the recommended set up for your bindings in your routed component
is:

```js
{
  ...
  bindings: {
    $router: '<'
  }
}
```
@naomiblack
Copy link
Copy Markdown
Contributor

Closing this PR because it is superceded by #7325 which contains this work + fixes.

@naomiblack naomiblack closed this Feb 27, 2016
petebacondarwin pushed a commit to petebacondarwin/angular that referenced this pull request Feb 27, 2016
@petebacondarwin deserves credit for most of this commit.

This allows you to specify a regex and serializer function instead
of the path DSL in your route declaration.

```
@RouteConfig([
  { regex: '[a-z]+.[0-9]+',
    serializer: (params) => `{params.a}.params.b}`,
    component: MyComponent }
])
class Component {}
```

Closes angular#7325
Closes angular#7126
IgorMinar pushed a commit to IgorMinar/angular that referenced this pull request Mar 2, 2016
@petebacondarwin deserves credit for most of this commit.

This allows you to specify a regex and serializer function instead
of the path DSL in your route declaration.

```
@RouteConfig([
  { regex: '[a-z]+.[0-9]+',
    serializer: (params) => `{params.a}.params.b}`,
    component: MyComponent }
])
class Component {}
```

Closes angular#7325
Closes angular#7126
vikerman pushed a commit that referenced this pull request Mar 3, 2016
@petebacondarwin deserves credit for most of this commit.

This allows you to specify a regex and serializer function instead
of the path DSL in your route declaration.

```
@RouteConfig([
  { regex: '[a-z]+.[0-9]+',
    serializer: (params) => `{params.a}.params.b}`,
    component: MyComponent }
])
class Component {}
```

Closes #7325
Closes #7126
@petebacondarwin petebacondarwin deleted the custom-url-matchers branch September 2, 2017 14:50
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: no effort2: days feature Label used to distinguish feature request from other issues state: WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants