Created
May 27, 2014 19:32
-
-
Save JosephShering/8b856503f76d3b62ee7f to your computer and use it in GitHub Desktop.
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 ng-app="myapp"> | |
<head> | |
<title>This is a test</title> | |
<script src="assets/js/angular.min.js"></script> | |
</head> | |
<body> | |
<div ng-controller="MainController"> | |
<input type="text" ng-model="name" /> | |
<ul> | |
<li ng-repeat="person in people | filter : name"> | |
{{ person.name }} | |
</li> | |
</ul> | |
<div> | |
<script> | |
var app = angular.module('myapp', ['ngRoute']); | |
app.controller("MainController", function($scope){ | |
$scope.understand = "You need to understand something"; | |
$scope.people = [ | |
{ name: 'John' }, | |
{ name: 'Avery'}, | |
{ name: 'Dorn' } | |
]; | |
}); | |
app.config(function($route, $location){ | |
$route | |
.when('/', | |
{ | |
controller : 'MainController', | |
templateUrl : 'assets/index.html' | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment