Skip to content

Instantly share code, notes, and snippets.

@bakanis
Created December 2, 2014 09:19
Show Gist options
  • Select an option

  • Save bakanis/0222191fceb75710422d to your computer and use it in GitHub Desktop.

Select an option

Save bakanis/0222191fceb75710422d to your computer and use it in GitHub Desktop.
AngularJs training #1
<!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