Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

allow to pass a function as templateUrl in routes #1193

Closed
dcu opened this issue Jul 21, 2012 · 6 comments
Closed

allow to pass a function as templateUrl in routes #1193

dcu opened this issue Jul 21, 2012 · 6 comments

Comments

@dcu
Copy link

dcu commented Jul 21, 2012

right now you have to do a ugly hack to achieve something similar (for example: http://stackoverflow.com/questions/11534710/angularjs-how-to-use-routeparams-in-generating-the-templateurl )

it would be nice if angularjs allows you to pass a function that receives $routeParams (and $location if possible)

what do you think?

@jamie-pate
Copy link

What about parsing the templateUrl for params (just like the route is currently) and using the params from the route to choose the template dynamically?

(I've done this in my fork, jamie-pate@dc9be17 )

@dcu
Copy link
Author

dcu commented Sep 3, 2012

did you send a pull request @jamie-pate ?

@jamie-pate
Copy link

No, have to jump through legal loopholes first (since I need the corporate CLA signed), also want to run the code on a real site before sending a pr

@dcu
Copy link
Author

dcu commented Nov 12, 2012

#1524 is a possible solution for this issue.

@latentflip
Copy link
Contributor

Hi @dcu is this still an issue, or was it resolved by: #1524? If it's resolved would you mind closing this issue. Thanks! 👍

@pkozlowski-opensource
Copy link
Member

@dcu this should be covered by #1524. Closing for now, please reopen if things are still missing.

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

No branches or pull requests

4 participants