Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

template-url attribute support #5405

Closed
geroyche opened this issue Feb 3, 2016 · 5 comments
Closed

template-url attribute support #5405

geroyche opened this issue Feb 3, 2016 · 5 comments

Comments

@geroyche
Copy link

geroyche commented Feb 3, 2016

overriding templates via attrs.templateUrl is not consistently implemented across directives.
some support it, others don't.
i specifically came across it trying to override uib-tab in order to remove the empty href.

@Foxandxss
Copy link
Contributor

That is pretty much correct. I will consider it.

@wesleycho
Copy link
Contributor

It should be noted that all components that support it has it mentioned in the documentation.

This is missing though, and I believe I have seen that it was missing in the past, but I forgot to file a PR/issue implementing it for tabs.

@agrahamlincoln
Copy link
Contributor

I've taken a look at the documentation and identified some of the work that needs to be done.

The following components need template-url implementations and currently have none:

  • Button
  • Collapse
  • ProgressBar
  • Rating
  • Tabs

The following directives have a similar implementation but naming is inconsistent:

  • Datepicker - uses datepicker-popup-template-url and datepicker-template-url
  • Modal - uses templateUrl and windowTemplateUrl instead of *template-url
  • Popover - uses uib-popover-template instead of *template-url
  • Tooltip - uses uib-tooltip-template instead of *template-url
  • Typeahead - uses typeahead-template-url and typeahead-popup-template-url

For directives with multiple templates, the naming scheme seems to be [component]-<subcomponent>-template-url.

@Foxandxss
Copy link
Contributor

Better to open a new issue for that.

It is not that inconsistent :P

Modal is a service so that is why it is camelCase and not kebab-case.

Datepicker is fine, that is the way it should be done (same with typeahead).

Popover / tooltip is a bit different because those uib-xxx-template are directives and it is not a mere template-url option to override a concrete template.

@wesleycho
Copy link
Contributor

Collapse also has no template, and not sure it makes sense to have this feature for buttons either.

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