How can I do the ng-include conditionally in angularJS?
For example I only want to include something if, the variable x is set to true.
x
true
If the condition is simple enough, you could also put the conditional logic directly in the ng-include expression:
Note the expression x is not in single quotes and therefore evaluated. See http://plnkr.co/edit/4fvNDa6Gm3dbVLgsAZrA for more details.