Created
December 2, 2014 09:19
-
-
Save bakanis/0222191fceb75710422d to your computer and use it in GitHub Desktop.
AngularJs training #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js"></script> | |
| </head> | |
| <body> | |
| <p>Try to change the names.</p> | |
| <div ng-app="" ng-controller="MyAppCtrl"> | |
| First Name: <input type="text" ng-model="fName"><br> | |
| Last Name: <input type="text" ng-model="lName"><br> | |
| <br> | |
| Full Name: {{fName + " " + lName}} | |
| </div> | |
| <script> | |
| function MyAppCtrl($scope){ | |
| $scope.fName = "John"; | |
| $scope.lName = "Doe"; | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment