Skip to content Skip to sidebar Skip to footer

Get Value From Input (angularjs)

I have the following inputs and need their values: What

Solution 1:

If you want to get values in Javascript on frontend, you can use the native way to do it by using :

document.getElementsByName("movie")[0].value;

Where "movie" is the name of your input<input type="text" name="movie">

If you want to get it on angular.js controller, you can use;

$scope.movie

Solution 2:

If your markup is bound to a controller, directive or anything else with a $scope:

console.log($scope.movie);

Post a Comment for "Get Value From Input (angularjs)"