JSFiddle - React, Tailwind, and code Playground

by GlobalDomestic

HTML

<div ng-app ng-controller="Ctrl">
    <pre>{{original}}</pre>
    <pre>{{copy}}</pre>
</div>

JavaScript

function Ctrl( $scope, $timeout ) {
    $scope.original = [ 'foo', 'bar' ];
    $scope.copy = angular.copy($scope.original);
    
    $timeout(function() {
        $scope.original = [ 1, 2, 3 ];
    }, 1000);
    
    $timeout(function() {
        $scope.copy = [ 'apples', 'oranges' ];
    }, 2000);
}