I am trying to make a simple example in which the input field and button field each time the user clicks the button.
How can I get the text of the input field when a new button that is present along with the input field is pressed?
http://codepen.io/anon/pen/yNLGzx
var app = angular.module('ionicApp',['ionic']); app.controller('cntr',function($scope){ $scope.addfield=function(){ alert("how to add input field dyanmically") } })
I do not know how to do that; in jQuery we can use the append function, for example
$('.addcontend').append('<input \> <button>get input value</button>')
How can I get this using angularjs?
source share