$watch-tests

This is a complete package with jQuery, jQueryUI, AngularJS and twitterBootstrap

by pythondave

HTML

<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="http://code.angularjs.org/1.1.0/angular.js"></script>
<script src="https://raw.github.com/angular-ui/angular-ui/master/build/angular-ui.js"></script>
<link rel="stylesheet" href="https://raw.github.com/angular-ui/angular-ui/master/build/angular-ui.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.22/themes/base/jquery-ui.css">
<div ng-app="myapp">
    <div ng-controller="myctrl">
        <p>{{list}}</p>
        <a class="btn" ng-click="addItem()">Add Item</a>
    </div>
</div>

JavaScript

var myapp = angular.module('myapp', ["ui"]);

myapp.controller('myctrl', function($scope) {

    $scope.testInfo= "TestInfo";
    $scope.list = ["one", "two"];
    
    $scope.$watch("list", function(newValue){
        alert("New value for 'list' added: " + newValue);
    });
    
    $scope.addItem = function(){
        $scope.list.push("next");
    };

});