Skip to main content
added 5 characters in body
Source Link
Lucian
  • 644
  • 3
  • 13

Use ng-if to only render the directive when user.id is defined:

<my-directive user-id="user.id" ng-if="user.id"><id >= 0"></my-directive>

Use ng-if to only render the directive when user.id is defined:

<my-directive user-id="user.id" ng-if="user.id"></my-directive>

Use ng-if to only render the directive when user.id is defined:

<my-directive user-id="user.id" ng-if="user.id >= 0"></my-directive>
Source Link
Lucian
  • 644
  • 3
  • 13

Use ng-if to only render the directive when user.id is defined:

<my-directive user-id="user.id" ng-if="user.id"></my-directive>