AngularJs apply custom directive to HTML conditionally
<p>Is there a right way to apply custom directive to HTML template based on some condition</p>

<p>Eg: <code>&lt;li my-custom-directive="{{item}}"&gt;</code></p>

<p>I need to apply "my-custom-directive" only if {{item}} is defined. </p>