I apologize in advance if i\'m not wording this properly. I have a textbox with ng-model
inside an ng-repeat
and when I try to get the textbox valu
Split the model up into heading and value
angular.module('MyApp',[]);
function PostCtrl($scope) {
$scope.posts = [{heading:'tech',value:''}, {heading:'news',value:''}, {heading:'sports',value:''},{heading:'health',value:''}];
$scope.savePost = function(post){
alert( 'post stuff in textbox: ' + post);
}
}
HTML below..
{{post.heading}}
save post
Check out this Fiddle..