Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (37 sloc) 954 Bytes
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Scroll Trigger</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.2/angular.js"></script>
<script src="../dist/scroll-trigger.js"></script>
<script>
angular.module('demo', ['scroll-trigger'])
.controller('TestCtrl', function($scope) {
$scope.data = Math.random();
$scope.call = function(thing) {
console.log('called with ' + thing);
};
})
.run(function() {
var div = document.createElement('div');
div.setAttribute('scroll-trigger', 'call(data)');
div.setAttribute('ng-controller', 'TestCtrl');
document.body.appendChild(div);
});
</script>
<style>
div {
width: 200px;
height: 1000px;
background-color: #147;
}
.placeholder {
background-color: #000;
}
</style>
</head>
<body ng-app="demo">
<div class="placeholder"></div>
</body>
</html>
You can’t perform that action at this time.