angular.module('starter.controllers', [])
.controller('controller1',function($scope) {
$scope.function1= function() {
---------------
})
.controller('controller2',function($scope) {
$scope.function1= function() {
//is it possible to access method form controller1 in controller2 like this
controller1.function();
})
나는 각도 JS에서 초보자이므로 코드 작성을 안내하겠습니다.AngularJS에서 Controller 2의 컨트롤러 1에 대한 액세스 방법
아니요 두 번째 컨트롤러에서 액세스 할 수 없지만 기능을 공유하고 싶다면 b/w cont 롤러는 각도 서비스를 만듭니다. – squiroid