Suppose I have following angularjs template
<script type="text/ng-template" id="tmp">
<li>
{{firstname}} {{lastname}}</li>
</script>
and I have two textboxes and a save button like
<input name="firstname" type="text"/>
<input name="lastname" type="text"/>
<button name="save" text="save"/>
when user enters values in firstname and lastname textboxes and press on save button I want these two values to be passed to the template and resultant html should be appended to an existing ul
. How can I do it with angular?
ul
element that is present on the page. – Muhammad Adeel Zahid Sep 21 '14 at 14:26ng-repeat
directive in yourul
instead? It would be a lot easier. – bmceldowney Sep 21 '14 at 14:40ng-repeat
handles dynamic data just fine. – bmceldowney Sep 21 '14 at 14:44