Problem: The first line is not picking up the persons name "<label>Hello 
{{person.first}} </label>"
----------------

index.html
---------
<body>
    <section>
        <div ng-app="myApp" ng-controller="myCtrl">
            <label>Hello {{person.first}} </label>
            <div>
                First Name: <input type="text" ng-model="firstName">
            </div>
            <div>
                Sir Name : <input type="text" ng-model="sirName"><br />
                <br>
            </div>
            <button ng-click="sendName()">Submit</button>
        </div>
    </section>
</body>


--Script file--
app.controller('myCtrl', function ($scope, $http) {
    $scope.firstName = "1";
    $scope.sendName = function () {

        console.log($scope.firstName);

        $scope.person = {};
        $scope.person.first = $scope.firstName;
};
}

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to