title: AngularJs if statement in ng-href
body: <p>I have some elements which are created dynamically and every element has a different ng-href.</p>
  
  <p>I want to give different link according to some elements.</p>
  
  <p>When I try to write function in ng-href it sends the page to function in url,therefore it does not work.</p>
  
  <p>I try to do something  like this;</p>
  
  <pre><code>       .......
               &lt;a 
              ng-href='if(m){#linkOne} else {#linkTwo}'
              ng-click='test(type);'&gt;
  
                &lt;/a&gt; 
         .......
  </code></pre>
  
  <p>Which method should i use to create element with different ng-href?</p>