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

feat(autocomplete): Custom template support for autocomplete #383

Closed
wants to merge 1 commit into from
Closed

feat(autocomplete): Custom template support for autocomplete #383

wants to merge 1 commit into from

Conversation

cheonhyangzhang
Copy link

Add support to render the suggestion for autocomplete using custom template. Add a new option for directive auto-complete, template-html-url, this is the url to load template html. If the option is not defined, the suggestion is using the default html. Otherwise, it is using the custom html. Custom html might look like “{{text}} - {{author}}”. Template could be defined in html by using “<script type="text/ng-template" id="custome_template.html"></script>”

Issue #99

Add support to render the suggestion for autocomplete using custom template. Add a new option for directive auto-complete, template-html-url, this is the url to load template html. If the option is not defined, the suggestion is using the default html. Otherwise, it is using the custom html. Custom html might look like  “{{text}} - {{author}}”. Template could be defined in html by using “<script type="text/ng-template" id="custome_template.html"></script>”

Issue #99
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 0cb50a9 on cheonhyangzhang:frank-custom-template into * on mbenford:master*.

@inguansoft
Copy link

The template is a good idea, I think It should be extended to tempting form an angular template so that html is allowed with angularJS data binding. I'll start working on this if no body has worked in progress

@cheonhyangzhang
Copy link
Author

Are you suggesting providing an option like template-html, so that you can literally pass in the custom template html code into this option?

@inguansoft
Copy link

#99

Something like what angular uses for directives and include on html angular include
https://thinkster.io/egghead/templateurl

@mbenford
Copy link
Owner

mbenford commented Mar 7, 2015

@cheonhyangzhang Thanks for sending your contribution! 👍

I'm working on bringing custom template support to the autoComplete directive, and I'm following a different approach than yours. The main difference is that I'm making Angular do the heavy lifting for me. :) Check out this prototype to understand it better.

@cheonhyangzhang
Copy link
Author

@mbenford Yep. Got it. I am not a master at Angular and might do things not in the best practice way.

I am looking forward to see your changes.

@mbenford
Copy link
Owner

mbenford commented Mar 9, 2015

I've pushed my changes to a remote branch and I wonder if you could take a look at the feature and share your feedback? Please read my comments here for more information.

@mbenford
Copy link
Owner

I'm closing this PR since this feature has been implemented in b550b11.

@mbenford mbenford closed this Mar 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants