angular-google-maps
angular-google-maps copied to clipboard
SearchBox : is there a way to pass a template as string instead of path?
When we use <ui-gmap-search-box>
the template attribute expect an url string to work.
// controller.js
this.searchbox = { template: 'searchfield.template.html' };
<!-- template.html -->
<ui-gmap-search-box
template="$ctrl.searchbox.template"
...
</ui-gmap-search-box>
but if we want to import a template from a html file and pass it to the directive that does not work as expected.
// controller.js
import searchFieldTemplate from './searchfield.template.html';
this.searchbox = { template: searchFieldTemplate };
<!-- template.html -->
<ui-gmap-search-box
template="$ctrl.searchbox.template"
...
</ui-gmap-search-box>
Is there a way to do pass a tempalte or a directive/component as a template?
Should'nt we change the template
attribute to a more semantic template-url
attribute?
Version
2.3.3