I am new to Angular Js and i have just done basic tags of angularjs and when i started controller part i understood the concept but was unable to fetch data input by user..Please guide me so that i can take one step further in AngularJS
Thanks in Advance!!
<!DOCTYPE html>
<html>
<head></head>
<body>
<div ng-app="nehaApp" ng-controller="Mayank">
Name : <input type="text" ng-model="Firstname">
Friends : <input type="text" ng-model="Friendname">
{{ Firstname + " " + Friendname}}
</div>
<script>
var appname = angular.module('nehaApp',[]);
appname.controller('Mayank',function($scope)
{
$scope.Firstname = "Neha";
$scope.Friendname = "Mayank";
});
</script>
</body>
</html>
{{ Firstname }} {{ Friendname }}The + you have in there will actually try and evaluate whatever you have in there{{ Firstname + " " + Friendname}}works and does outputNeha Mayankand updates as expected wheninputare updated. So not sure what the question is here... Here's a working plnkr: plnkr.co/edit/LX8VpO5i7zVzovovc8Oo