-
Notifications
You must be signed in to change notification settings - Fork 72
Make layers config URL template configurable #261
Conversation
Do not merge. I need to fix the tests. |
Tests are fixed. Ready for review this time. |
Strictly speaking, the component (gaLayers service) has to make assumptions about the application (where the template is defined, in our case in the index.html) to be able to create the correct url. But we have this in other places and it can't be avoided (e.g. a directive calling an options.xxx function which is defined in the application controller) It's not that I would have a better solution in mind currently. So I'm not against merging this because it puts the url definition to the application layer. +1 |
I don't understand this. Could you please be more specific? I actually don't see the directives making such assumptions. |
This PR needs rebasing. |
Sorry to be unclear:
The directive has to know what to replace, e.g. I don't think it's much different than other such cases. It could be viewed as the application satisfying the components interface. In any case, it's a good change! |
Ok. Thanks for the explanations. I understand what you mean now. |
I've rebased it, but I'd rather merge #126 first. |
Now rebased on #262. I also added a commit making the legend URL template configurable as well. |
@gjn please review this again, and merge if you're happy with it. |
The layers config URL is currently hard-coded in the gaLayers service. This PR makes it configurable at the application level.
Please review.