Question: how to pass data from view to controller using angularjs?
Answer: contacts . Also on your view, when you pass something into ng-model, this is basically creating a two-way data binding between a variable with that name in your controller. So in this case, your html will create two variables: $scope. contactname and $scope.