Skip to content

Instantly share code, notes, and snippets.

@duycuong87vn
Created April 10, 2014 16:22
Show Gist options
  • Save duycuong87vn/10399112 to your computer and use it in GitHub Desktop.
Save duycuong87vn/10399112 to your computer and use it in GitHub Desktop.
.show-scope-demo.ng-scope,
.show-scope-demo .ng-scope{
border: 1px solid red;
margin: 3px;
}
<!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>
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