3
요약 :ui.bootstrap의 이름을 변경하지 않으면 require.js로 각도 ui 부트 스트랩을로드합니까? 코드의
main.js :
require.config({
paths: {
'uiBootstrap': '../lib/bootstrap/angular-bootstrap/ui-bootstrap-tpls.min'
},
shim: {***},
priority: ['angular'],
deps: [
'./bootstrap'
]
});
bootstrap.js :
define([
'require',
'angular',
...
], function (require, ng) {
'use strict';
require([
'domReady!',
'uiBootstrap'
], function (document) {
ng.bootstrap(document, ['app']);...
app.js :
define([
'angular',
...
], function (ng) {
'use strict';
return ng.module('app', [
...
'uiBootstrap'
]);
});
다른 조합을 시도하면서 다양한 오류가 발생했습니다. ui-bootstrap-tpls.min.js에 들어갈 때까지 실제로 모든 ui.bootstrap을 uiBootstrap로 대체하고 위에 표시된 모듈 이름 참조를 수정했습니다. 그리고 presto - ui-bootstrap이 잘 작동합니다.
분명히 이것은 최적의 솔루션이 아닙니다.
아무도이 문제가 발생하는 이유와 해결 방법이 무엇인지에 대한 통찰력을 제공 할 수 있습니까?이 소스를 사용하여 공개 된이 ui-bootstrap을 사용하지 마십시오.
감사합니다! 당신의 app.js
에서