Created
October 3, 2016 14:34
-
-
Save localdevm/d1691a19aa4dc5bb46ff8de56d5f4c78 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
<html> | |
<head> | |
<title>Sample</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js"></script> | |
<script> | |
angular.module('sampleApp', []); | |
angular.module('sampleApp').controller('FirstController', function ($scope, $interval) { | |
$scope.first = { | |
greeting: "Hallo" | |
}; | |
var time = 0; | |
$interval(function(){ | |
console.log("And jump"); | |
time++; | |
if (time == 3){ | |
console.log("testje"); | |
} | |
}, 1000); | |
}); | |
angular.module('sampleApp').controller('SecondController', function ($scope){ | |
$scope.first.greeting = "HalloNowNested"; | |
}); | |
</script> | |
</head> | |
<body ng-app="sampleApp"> | |
<div ng-controller="FirstController"> | |
<h1>{{ first.greeting}}</h1> | |
<img src="workout1.png"> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment