Skip to content

Commit

Permalink
do the lab
Browse files Browse the repository at this point in the history
  • Loading branch information
La-comadreja committed Mar 11, 2016
1 parent e357ee2 commit 924ca53
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Angular Application</title>
</head>
<body>

<div ng-app="app">
<div ng-controller="ContactController">
Hello, {{ name }}!
</div>
</div>

<script src="js/angular.js"></script>
<script src="js/app/app.js"></script>
<script src="js/app/controllers/ContactController.js"></script>

</body>
</html>
10 changes: 6 additions & 4 deletions js/app/controllers/ContactController.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
function ContactController($scope, $timeout) {
$scope.name = 'Bill Gates';
function ContactController(whatever, weWant) {
whatever.name = 'Bill Gates';

$timeout(function () {
$scope.name = 'Steve Jobs';
weWant(function () {
whatever.name = 'Steve Jobs';
}, 5000);
}

ContactController.$inject = ['$scope', '$timeout'];

angular
.module('app')
.controller('ContactController', ContactController);

0 comments on commit 924ca53

Please sign in to comment.