Here is an simple example to add and delete list using angular ng-click
Html -
<div ng-app="nameApp" ng-controller="TitleCtrl">
<ul>
<li ng-repeat="name in names">{{name}}
<a href="" ng-click="removeName(name)">remove</a></li>
</ul>
<form ng-submit="addName()">
<input type="text" ng-model="enteredName">
<input type="submit" value="+">
</form>
</div>
For full blog about Remove/add list using ng-click visit Findnerd.
Also if you have any query related to javascript then you can post it on our javascript questions and answers developer forum. We are Happy to hear you!!!
Html -
<div ng-app="nameApp" ng-controller="TitleCtrl">
<ul>
<li ng-repeat="name in names">{{name}}
<a href="" ng-click="removeName(name)">remove</a></li>
</ul>
<form ng-submit="addName()">
<input type="text" ng-model="enteredName">
<input type="submit" value="+">
</form>
</div>
For full blog about Remove/add list using ng-click visit Findnerd.
Also if you have any query related to javascript then you can post it on our javascript questions and answers developer forum. We are Happy to hear you!!!
No comments:
Post a Comment