title: What is the angularjs directive to select list item?
body: <p>i have a list of templates and i would like to select one of them from a list and pass the id to an input inside a form. My laout looks like this</p>
  
  <pre><code>&lt;form&gt;
      &lt;input type="hidden" name="template_id" ng-model="template.template_id" /&gt;
      &lt;input type="text" name="template_name" ng-model="template.template_name" /&gt;
      &lt;ul&gt;
          &lt;li id="1"&gt;Template1&lt;/li&gt;
          &lt;li id="2"&gt;Another Template&lt;/li&gt;
      &lt;/ul&gt;
      &lt;button type="submit"&gt;&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now i would like when i press on any of the <code>&lt;li&gt;</code> items, to change the content from the inputs. Can this be done using a directive? Thank you, Daniel.</p>
  
  <p>When i press on first list item, i want the input having the template_id and template_name to set to template_id = 1 and template_name = Template1 and when i press the second list item, to set template_id to 2 and template_name to Another template.</p>