Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Permit routes with slashes #55

Closed
wants to merge 1 commit into from

Conversation

dgresham
Copy link

@dgresham dgresham commented Jun 6, 2014

Allow route parameters with slashes in them, if the param name has a trailing * character.

@OzzieOrca
Copy link
Contributor

Looks like a great feature. I'm going to use it.

@OzzieOrca
Copy link
Contributor

It should be noted that if you define your path like this with the path parameter now containing a *:

//Assuming the RouteViewFactory has been injected as the variable `views`
views.configure({
  'page': ngRoute(
      path: '/:pageUrl*',
      viewHtml: '<page></page>'
  )
});

then when using it in a component or elsewhere that parameter in the parameters map must also cantain the *:

//Assuming the RouteProvider has been injected as the variable `routeProvider`
url = routeProvider.parameters['pageUrl*'];

This took me a little while to figure out. This should either be documented well or possibly we should remove the * when the parameter is saved to the parameters map. My intuition was that the * wouldn't be included in the parameter name. Opps.

@OzzieOrca
Copy link
Contributor

Any reason this hasn't been merged?

@OzzieOrca
Copy link
Contributor

I remade these changes to a fork based off of route_hierarchical 0.5.0. It should be easier to merge since it is no longer a ways behind master. Also this is useful for me to use in my app until it gets merged.
#82

OzzieOrca added a commit to OzzieOrca/daviscru-web that referenced this pull request Oct 18, 2014
…d in the PageComponent's url. Resolves issue #1. Currently relies on an open pull request for the route_hierarchical package: dart-archive/route.dart#55
@OzzieOrca
Copy link
Contributor

This can be closed. It was merged in #82

@pavelgj pavelgj closed this May 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants