These are chat archives for filearts/plunker

29th
May 2017
Sandeep S
@Sandeepguly
May 29 2017 07:05

<!DOCTYPE html>

<html>

<head>
<link data-require="bootstrap@4.0.5" data-semver="4.0.5" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" />
<link data-require="bootstrap-css@4.0.0-alpha.4" data-semver="4.0.0-alpha.4" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" />
<script data-require="bootstrap@4.0.5" data-semver="4.0.5" src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/js/bootstrap.min.js"></script>
<script data-require="angular.js@4.0.0" data-semver="4.0.0" src="https://code.angularjs.org/latest/angular.min.js"></script>
<script data-require="jquery@3.1.1" data-semver="3.1.1" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
</head>

<body ng-app="myModule">
<div ng-controller="myCtrl">
a= <input ng-model="a" />
<div>a = {{a}}</div>
<div>b = {{b}}</div>
<div>c = {{c}}</div>

</div>

<script src="script.js"></script>
</body>

</html>

var app = angular.module('myModule',[]);
app.controller('myCtrl',['$scope','$rootscope', function($scope,$rootScope){

$scope.a = 10;
$scope.b = 20;
$scope.c = 15;

        $scope.$watch('a', function(newValue, oldValue){
            if (newValue != oldValue) {
                console.log("a modified to " + newValue);
            }

        });

        $scope.$watch('b', function(newValue, oldValue){
            if (newValue != oldValue) {
                console.log("b modified to " + newValue);
            }

        });

        $scope.$watch('c', function(newValue, oldValue){
            if (newValue != oldValue) {
                console.log("c modified to " + newValue);
            }


        });

        $rootScope.$watch(function(){
            console.log('....degest cycle started now....');
        });

}]);

can anyone help me what's the error in dis code??
some $injecter problem i'm getting
chetbis
@chetbis
May 29 2017 07:23
@Sandeepguly you've got a typo
@Sandeepguly $rootscope change it to $rootScope
@Sandeepguly app.controller('myCtrl',['$scope','$rootscope', function($scope,$rootScope){
Sandeep S
@Sandeepguly
May 29 2017 07:37
@chetbis ya thank u jst got it