JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.angularjs.org/1.0.1/angular-1.0.1.js"></script>
<div ng-app ng-controller="Ctrl">
    <h2>tst {{tst}}</h2>            

    <h2>But changing a value on a single item will ... why is this happening?</h2>
    <button id="button1" ng-click="check()">Works</button>
</div>

JavaScript

function Ctrl($scope) {
    $scope.check = function() {
        alert('Works!');
    }
        
    $scope.check2 = function() {
        alert('Works 2!');
    }        
 
}
var scope;
setTimeout(function() {
    elem = $('<p><button id="button2" onclick="scope.check2()">Does not work</button></p>').insertAfter('#button1');
    scope = angular.element('#button2').scope();
}, 2000);