Skip to content

feat(UrlMatcher): Add support for case insensitive url matching #957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2014
Merged

feat(UrlMatcher): Add support for case insensitive url matching #957

merged 1 commit into from
Mar 12, 2014

Conversation

mauroservienti
Copy link
Contributor

Add support for case insensitive url matching, by default url match is case sensitive, for backward compatibility. Case sensitive match can be turned on/off globally via $urlMatcherFactoryProvider caseInsensitiveMatch( true/false ) method.

@timkindberg
Copy link
Contributor

You did it!!

timkindberg added a commit that referenced this pull request Mar 12, 2014
…nsistive

feat(UrlMatcher): Add support for case insensitive url matching
@timkindberg timkindberg merged commit 60b278b into angular-ui:master Mar 12, 2014
@mauroservienti mauroservienti deleted the feat-UrlMatcher-Case-Insensistive branch March 12, 2014 12:35
@christopherthielen
Copy link
Contributor

thanks 👍 @mauroservienti

@mauroservienti
Copy link
Contributor Author

my pleasure :-)
A question: any plan for a 0.2.9 release that includes this and the fixes for #919 and #858?

cheers,
.m

@christopherthielen
Copy link
Contributor

@mauroservienti Tim commented on #704 (comment) 5 days ago saying the next release would be something like 4 weeks out.

@mauroservienti
Copy link
Contributor Author

great, thanks again.

@nateabele
Copy link
Contributor

Sorry I didn't get a chance to comment on this, but I really wish it hadn't been merged. :-/

This is really bad API design, and it'll be that much more problematic for people using it when it gets cleaned up.

@mauroservienti
Copy link
Contributor Author

What is the problem with the API, there is one single method, and nothing else?

@timkindberg
Copy link
Contributor

@nateabele sorry, I'll not merge things in the future without your comment. It seemed like the appropriate API to me though. My bad man. How do you think we should have approached it?

@nateabele
Copy link
Contributor

@mauroservienti Most of the problems are around the new constructor signature for UrlMatcher. (A) When a method accepts multiple parameters, boolean parameters are bad because you can't infer their meaning from context. (B) This sets the precedent that every new configuration option will be yet-another-parameter.

@mauroservienti
Copy link
Contributor Author

Really good point, thanks for the explanation. I'm not so good at JavaScript.
Since we are still in time, how do you suggest we change the implementation?
Maybe via a factory method or a property even on the UrlMatcher?

Cheers.
.m


From: Nate Abelemailto:[email protected]
Sent: ý15/ý03/ý2014 16.54
To: angular-ui/ui-routermailto:[email protected]
Cc: Mauro Servientimailto:[email protected]
Subject: Re: [ui-router] feat(UrlMatcher): Add support for case insensitive url matching (#957)

@mauroservientihttps://github.com/mauroservienti Most of the problems are around the new constructor signature for UrlMatcher. (A) When a method accepts multiple parameters, boolean parameters are bad because you can't infer their meaning from context. (B) This sets the precedent that every new configuration option will be yet-another-parameter.


Reply to this email directly or view it on GitHubhttps://github.com//pull/957#issuecomment-37729311.

@timkindberg
Copy link
Contributor

So maybe we should have done an options param instead as the 2nd parameter. So then it would be explicit: {caseInsensitive: true/false}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants