Angular $scope.form Value undefined on Submit in Ionic Framework

By Hardik Savani October 20, 2023 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(;




Tags :