Created
February 18, 2014 11:56
-
-
Save sphingu/255a3acd38d2b2049cf0 to your computer and use it in GitHub Desktop.
FirstAngularApp
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
<html ng-app > | |
<head> | |
<title>First Application</title> | |
<!--<script type="text/javascript" src="jquery-1.10.2.js"></script>--> | |
<script type="text/javascript" src="angular.min.js"></script> | |
<script type="text/javascript"> | |
function AlbumController($scope) { | |
$scope.images = [ | |
{ "thumbnail": "img/1.png", "description": "Bootstrap MVC" }, | |
{ "thumbnail": "img/2.png", "description": "Happy Holiday" } | |
]; | |
} | |
</script> | |
</head> | |
<body> | |
<div data-descript="ExampleOne Without any controller for Two Way Binding"> | |
<label>Name :</label> | |
<input type="text" ng-model="yourName" placeholder="Enter Your Name Here" /> | |
<hr /> | |
<pre>Hello, {{yourName}}</pre> | |
</div> | |
<div ng-controller="AlbumController"> | |
<ul> | |
<li ng-repeat="image in images | filter : description=yourName"> | |
<img alt="{{image.description}}" src="{{image.thumbnail}}" height="30" /> | |
</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment