Angular $scope.form value undefined on submit in ionic framework.

By Hardik Savani | March 5, 2016 | Category : jQuery Angular Ionic Framework

When i was working first time in ionic framework with search module. i fetch one issue i can't get ng-model value in angular js controller on submit form. i was try like $scope.form because if you work on angular JS before then you can get all post data using $scope.form directly, But i try with bellow form and try to get that way but i always find undefined value on form, But at last i found how to solve this issue. you can see bellow example and find your solution.


<form method="POST" name="searchForm" ng-submit="search()">

<div class="item item-input-inset">

<label class="item item-input">

<input ng-model="form.keyword" type="text" required>


<button class="button-calm" type="submit">

<i class="icon ion-search"></i>





.controller('SearchCtrl', function($scope,$http) {

$scope.posts = [];


var form = this.form;


$'/api/get_search_post',form).success(function(items) {

$scope.posts = $scope.posts.concat(;




Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.