I want to inject ng-dbclick
if just a condition is true
:
<li ng-if="condition ? ng-dblclick='event()':nothing">
Thanks.
I want to inject ng-dbclick
if just a condition is true
:
<li ng-if="condition ? ng-dblclick='event()':nothing">
Thanks.
You'll need to create two li
's
<li ng-if="condition" ng-dblclick="event()">
<your-component />
</li>
<li ng-if="!condition">
<your-component />
</li>
Otherwise you'll need to compile the template and do it on the javascript and not on the template. You can take a look at the following: Dynamically Import Component From Variable (AngularJS)