title: ternary operator in ng-app?
body: <p>Iam working on a component in AEM. I have components with independent <code>ng-app</code> for each component since Iam having multiple websites in each package and using the same components across various websites.</p>
  
  <p>Now when I drag and drop a component multiple times in a same page. Only one component is working. I sense it is coz of having same <code>ng-app</code> name. May I know how can I overcome it. Coz., even though the component is same., based on requirement., we had to make differnt API call and get data respect to that section in view.</p>
  
  <p>Iam having an idea of using <code>ternary operator</code> inside <code>ng-app</code> like this</p>
  
  <pre><code> ng-app="{{ apiType ? type1 : type2 }}"
  </code></pre>
  
  <p>But not sure <code>ternary operator</code> fires before <code>ng-app</code> declaration.</p>
  
  <p>Any Ideas</p>
  
  <p>Here is the sample plnkr based on inputs I received.</p>
  
  <p><a href="https://plnkr.co/edit/iwY0GGhMzlj6VpYWuLOR?p=preview" rel="nofollow noreferrer">plnkr code here</a></p>