0 저는 AngularJS를 처음 사용했는데 이것이 가능한지 모르겠습니다.AngularJS - 모듈이 다른 파일의 구성을 사용합니다. 이 내 현재 코드입니다 : var app = angular.module('qlikCockpitApp',['pascalprecht.translate','720kb.tooltips']); app.config(['$translateProvider', function ($translateProvider) { ... }); 내가 다른 파일이있는 app.config를 이동하려는, 내 모듈 파일에서 액세스 할 수 있습니다. 가능한가? 어떻게해야합니까? 출처 2017-12-12 Rafael Bittencourt
0 당신은 (var app = angular.module('qlikCockpitApp', [])) 이을 app.js이 말은 당신이 1 응용 프로그램이 이 경우 기억 응용 프로그램의 각 부분에 대한 두 파일 이상을 추가 할 수 있습니다 var app = angular.module('qlikCockpitApp',['pascalprecht.translate','720kb.tooltips']); app.config.js app.config(['$translateProvider', function ($translateProvider) { ... }); 오른쪽 종류와 index.html을에 파일을 추가 : <script src="app.js"></script> <script src="app.config.js"></script> Labjs 사용 : 당신이 lazyload 로 파일을로드 할 경우을 index.html 이 경우 <div id="app"></div> <!--required: download labjs library--> <script src="lab-library.js"></script> <script src="bootstrapper.js"></script> 16,는 파일 디렉토리 전에 / 추가 ng-app 세트 id 속성 bootstrapper.js $LAB.script( "/angular.js", "/app.js", "/app.config.js" ) .wait(function() { var root = document.getElementById("app"); angular.bootstrap(root, ["app"]); }); 를 사용하지 않는 출처 2017-12-12 16:51:55 Maher +0 'angular.module'을 사용하여 글로벌 'app' 변수와 참조를 없애는 것이 더 좋습니다. https://github.com/johnpapa/angular-styleguide/tree/master/a1#modules – charlietfl +0 빠른 답장을 보내 주셔서 감사합니다! 내 HTML 파일에 최근 질문 1. Android Wear가 현지화 된 버전을받지 않음 2. Grails 커맨드 객체가 같은 url/page를 갖도록 모델로 리다이렉트 3. FFMPEG 오디오 및 MP4 이미지 - 이미지가 표시되지 않습니다. 4. wordpress에서 올바른 스타일의 style.css 추가하기 5. pyparsing select_parser.py에서 괄호와 쉼표를 다시 가져 오는 방법은 무엇입니까? 6. 양도 <a href="#id"> to a javascript 7. 설명되지 않은 로컬 변수가 초기화되지 않았을 수 있음 8. 중첩 null 결합 연산자 (??)가 PHP에서 어떻게 작동합니까? 단계별 필요 실행의 설명은 9. 우분투의 httpdocs에 설치 10. Sentinel 정품 인증 방법 (Laravel 사용) 관련 문제 관련 문제 없음^_^
'angular.module'을 사용하여 글로벌 'app' 변수와 참조를 없애는 것이 더 좋습니다. https://github.com/johnpapa/angular-styleguide/tree/master/a1#modules – charlietfl
빠른 답장을 보내 주셔서 감사합니다! 내 HTML 파일에