Created
April 10, 2014 16:22
-
-
Save duycuong87vn/10399112 to your computer and use it in GitHub Desktop.
This file contains 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
.show-scope-demo.ng-scope, | |
.show-scope-demo .ng-scope{ | |
border: 1px solid red; | |
margin: 3px; | |
} |
This file contains 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 ng-app="demoApp"> | |
<head> | |
<meta name="description" content="[add your bin description]" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Using Angular Directives and Data Binding</title> | |
</head> | |
<body> | |
<div data-ng-controller="SimpleController"> | |
Name: | |
<br /> | |
<input type="text" data-ng-model="name"/> | |
<br /> | |
<ul> | |
<li data-ng-repeat="cust in customers | filter:name"> | |
{{cust.name}} + {{cust.city}} | |
</li> | |
</ul> | |
</div> | |
</body> | |
</html> |
This file contains 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
var demoApp = angular.module('demoApp', []); | |
demoApp.controller('SimpleController',function SimpleController($scope){ | |
$scope.customers = [ | |
{name:'John Smith', city:'Phoenix'}, | |
{name:'Alopicaso', city:'Newyork'}, | |
{name:'osacipola', city:'San Francisco'} | |
]; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment