Within a module, a controller can inherit properties from an outside controller: var app = angular.module('angularjs-starter',...
How do I use $rootScope to store variables in a controller I want to later access in another controller? For example: angular.module('myApp').controller('myCtrl', function($scope) ...
-
May 27, 2022
- 0 Comments
I have two Angular controllers: function Ctrl1($scope) { $scope.prop1 = "First"; } function Ctrl2($scope) { $scope.prop2 = "Second"; $scope.both = Ctrl1.prop1 + $scope.prop2; ...
-
May 14, 2022
- 0 Comments