title: Select item from list and send it back to server using Javascript AngularJS
body: <p>I have a list of items. I want to select them by clicking. Selected item will be sent to server. At a time only one item can be selected. So, for this I need a variable where I can store the item. Please no jQuery. I am looking for simple Javascript AngularJS. Here is my html. After selecting one item, it will automatically go to another list, which I kept in ng-if=false. Suppose, I click on item1 then it will show the list of list1, list2 and list3. Now, let's select list2. Now item1 and list2 will both go to server.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div ng-if="true"class="items"&gt;
    &lt;ul ng-if="true"&gt;
      &lt;li&gt;Item1&lt;/li&gt;
      &lt;li&gt;Item2&lt;/li&gt;
      &lt;li&gt;Item3&lt;/li&gt;
    &lt;/ul&gt;
    &lt;ul ng-if="false"&gt;
      &lt;li&gt;list1&lt;/li&gt;
      &lt;li&gt;list2&lt;/li&gt;
      &lt;li&gt;list3&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>In my fiddle, if I select one date then it should list of dates, which is given ng-if='false'
  fiddle link :- <a href="http://jsfiddle.net/abhijitloco/k6jso1u3/" rel="nofollow">http://jsfiddle.net/abhijitloco/k6jso1u3/</a></p>