angularjs - Can't get input value in Angular (Ionic) -


i'm new angular , ionic , have problem getting value of input. "undefined". here code:

.controller('myctrl', function($scope) {      $scope.submit = function () {      console.log($scope.name);    }      }
 <form ng-submit="submit()">     <input type="text" ng-model="name">         <button class="button">send</button>   </form>

try this

 <form>    <input type="text" ng-model="name">     <button ng-click="submit()" class="button">send</button>  </form> 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -