So I'm wanting to compile some JS code after the HTML is loaded.
var gifApp = angular.module('gifApp', []);
function MainCtrl ($scope) {
$scope.push = function() {
$("body").html("<div>{{ 1 + 1 }}</div>")
}
}
Whenever the function push is called {{ 1 + 1 }} is displayed on the screen when I really want 2. Is it not possible to compile the code after the window is done loading? If it is possible, how do I fix this.