-3
컨트롤러 기능이 각도로 실행되지 않습니다.컨트롤러 기능이 실행되지 않습니다. 각도
'use strict';
angular.module('newproejctApp')
.controller('dashboardCtrl', function ($rootScope, $scope, User, Auth,dataService) {
$scope.test="this is not working";
});
<div class="container" ng-controller="dashboardCtrl">
{{test}}
</div>
위의 샘플은 작동하지 않습니다. 이 프로젝트는 Yeoman이 만들고 다른 모든 컨트롤러는 정상적으로 작동합니다.
당신은 JS 콘솔에서 오류를 받고 있습니까? "newproejctApp"가 오타가 아닙니까? 중단 점을 설정하면 $ scope.test를 설정 한 행에 충돌합니까? – jadarnel27
js console, alert ("something"), console.log가 작동하지 않습니다. 이것을 디버깅하는 방법을 모르겠다. 처음에는 자식 변수 인 Ctrl을 상속 받고 위 예제가 @ jadarnel27에서 작동하지 않는다는 것을 알았을 때 주석을 달았다. – blended
위의 "newproejctApp"는 "newprojectApp" "? – jadarnel27