I've always used jQuery references to make a sticky footer for my sites. Now that im using AngularJS, there has been no need for me to use jQuery too. However, i cant seem to use my normal sticky footer code as $ is undefined.
HTML:
<h1>Basic plunk!</h1>
<p>If the header above is red, then you know Plunker is working!</p>
<p>The header above should slide right, indicating that jQuery is up and running.</p>
<!-- Put your html here! -->
<div id="page">
1
<br>2
<br>3
<br>4
<br>
</div>
<br>
<footer id="colophon">My footer</footer>
JS:
<script type="text/javascript">
$(document).ready(function() {
var bodyHeight = $("body").height();
var vwptHeight = $(window).height();
if (vwptHeight > bodyHeight) {
$("footer#colophon").css("position","absolute").css("bottom",0);
}
});
</script>
How can i perform the above but in an Angular friendly way?
Here's a plunker: http://plnkr.co/edit/k1EZqwpdXbKhODW4FyeF?p=preview