hi,

the below code  work's as your requirement



<!DOCTYPE html>
<html ng-app="myApp">

<script src="media/js/lib/angular.min.js"></script>
<body>

<div ng-controller="myCtrl">

name: <input type="text" ng-model="name"><br>
<br>
hello: {{name}}

</div>

<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.name= "jagdeep";

});
</script>

</body>
</html>


On Wed, Apr 29, 2015 at 12:22 PM, Doga <[email protected]> wrote:

> I've just started learning AngularJS and couldn't run below code. Anyone
> can tell me what I am missing in there
> <!DOCTYPE html>
> <html ng-app>
> <head>
> <title>Hello World</title>
> <script src="media/js/lib/angular.min.js"></script>
>
> </head>
> <body>
> <div ng-controller="MyController">
> Name: <input type="text" ng-model="name"/>
> Hello {{ name }}
> </div>
> <script>
> function MyController($scope) {
>
> $scope.name = "jagdeep";
> };
> </script>
> </body>
> </html>
>
>
>  --
> 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 http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to