YousefED / ElasticUI

AngularJS directives for Elasticsearch
http://www.elasticui.com
Other
526 stars 138 forks source link

Override directive template #72

Closed henninga closed 8 years ago

henninga commented 8 years ago

Hi

How can I override the template directive?

I've tried the following but it gives me the error "Unknown provider: euiSearchboxProvider"

`app.config(function ($provide) { $provide.decorator('euiSearchbox', function ($delegate) { var directive = $delegate[0];

    directive.template = '<input type="text" eui-query="ejs.MatchQuery(field, querystring)" ng-model="querystring" ng-model-options="{debounce:1000}" eui-enabled="querystring.length" />';
    return $delegate;
});

}); `

henninga commented 8 years ago

Never mind. The name of the directive should've been euiSearchboxDirective. Works now