সম্পাদনা
<!DOCTYPE html> <html ng-app="app"> <body> <div ng-controller="app"> <button ng-click="items.push('আম')">যোগ</button> <p>{{items}}</p> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.3/angular.min.js"></script> <script> angular.module("app", []) .controller("app", function($scope) { $scope.items = ["আপেল", "আঙ্গুর", "কমলা", "কলা"]; $scope.$watchCollection("items", function(n, o) { console.log(n); }); }); </script> </body> </html>
পূর্বরূপ