angular.module('starter.controllers', [])
.controller('controller1',function($scope) {
$scope.function1= function () {
// Code for controller1 function
}
})
.controller('controller2',function($scope, controller1) {
$scope.function1= function () {
//is it possible to access method from controller1 in controller2 like this?
controller1.function();
}
})
I am new to AngularJS and seeking guidance on how to complete my code. Any help would be appreciated.