내 레일 프로젝트 에서이 angular-number-picker 플러그인 을 사용하고 싶었습니다 .
.min.js 파일과 .js 파일을 다운로드하여 플러그인 폴더에 넣었습니다. 그런 다음 js도
/global_plugins.js
//= require global/plugins/angular-number-picker/angular-number-picker.min.js
그런 다음 내 앱의 종속성에도 주입합니다.
/app.js
var app = angular.module('fotograft', ['ngResource', 'angular-loading-bar', 'cgBusy', 'ngFileUpload', 'MessageCenterModule', 'rails', 'Devise', 'google.places', 'ui.sortable','checklist-model',
'textAngular', 'angularMoment', '720kb.socialshare', 'ngSanitize', '720kb.tooltips', 'angular-md5', 'angularUtils.directives.dirPagination', 'infinite-scroll', 'datatables', 'datatables.bootstrap',
'ngResource', 'frapontillo.bootstrap-switch', 'angular-bootstrap-select','angular-number-picker', 'angular-bootstrap-select.extra', 'ngTextTruncate', 'chart.js', 'timer', 'siyfion.sfTypeahead'])
문제는 페이지를로드하려고 할 때 페이지가 응답하지 않는다는 것입니다. 그래서 콘솔을보고 디버그하려고했는데 오류는
Error: [$injector:modulerr] http://errors.angularjs.org/1.3.16/$injector/modulerr?
나머지 오류 메시지는 길이가 길고 횡설수설처럼 보이기 때문에 잘 렸습니다.
그래서 여기서 내가 무엇을 놓치고 있는지 묻고 싶습니다. 저자의 웹 페이지에서 html 페이지의 플러그인에 src를 포함해야한다는 것을 보았지만 어떤 페이지에 포함해야할지 모르겠습니다.
레일과 angularJS 개발자가 여기에서 나를 도울 수 있다면 감사합니다. 대단히 감사합니다.
당신은 두 번 선택하면 소스 코드에 링크를 사용자가 제공, 당신이 등록해야하는 모듈 이름처럼 보이는이 있어야하는데 angularNumberPicker
대신 angular-number-picker
.
따라서 app.js 모듈 레지스트리가 다음과 같이 보이기를 원합니다.
var app = angular.module('fotograft', ['ngResource', 'angular-loading-bar', 'cgBusy', 'ngFileUpload', 'MessageCenterModule', 'rails', 'Devise', 'google.places', 'ui.sortable','checklist-model', 'textAngular', 'angularMoment', '720kb.socialshare', 'ngSanitize', '720kb.tooltips', 'angular-md5', 'angularUtils.directives.dirPagination', 'infinite-scroll', 'datatables', 'datatables.bootstrap', 'ngResource', 'frapontillo.bootstrap-switch', 'angular-bootstrap-select','angularNumberPicker', 'angular-bootstrap-select.extra', 'ngTextTruncate', 'chart.js', 'timer', 'siyfion.sfTypeahead']);
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다