2014-09-01 4 views
5

이 오류가 발생했습니다. 오류가 발생했습니다 : [$ injector : unpr] 알 수없는 공급자 : 성공적인 배포 후 eProvider < - e Heroku가

에 나는 BTW 각도의 사회적 공유를 사용하고 있습니다 : https://github.com/djds4rce/angular-socialshare

이 오류가 발생하지 않는 run 기능과 모듈 이름 djds4rce.angular-socialshare을 제거하지만 심하게 FB 공유를위한이 필요합니다.

//= require_self 
//= require_tree ./angular 

MyApp = angular.module("MyApp", ["ui.router", "ngCsv", "ui.bootstrap", "ngResource", "templates", "angularFileUpload", "ngSanitize", "ngCookies", "textAngular", "djds4rce.angular-socialshare"]).run(function($FB){ 
    $FB.init('1438666983087556'); 
}); 

어떤 아이디어가 있습니까? 감사.

답변

6

레일은 JS를 축소하고, 그래서 당신은 다른 구문을 사용해야합니다 : 그것은 작동하도록

MyApp = angular.module("MyApp", ["ui.router", "ngCsv", "ui.bootstrap", "ngResource", "templates", "angularFileUpload", "ngSanitize", "ngCookies", "textAngular", "djds4rce.angular-socialshare"]); 

MyApp.run(['$FB', function($FB){ 
    $FB.init('1438666983087556'); 
}]); 
+0

고마워요. 나는 이것을 내 마음에 간직 할 것이다. @apneadiving –

2

그게 올바른 내가 위해

@HomeCtrl = ['$scope', '$location', ($scope, $location) -> 
    $scope.things = ['Angular', 'Rails 4.1', 'Working', 'Together!!'] 
] 

내 커피 스크립트 파일을 변경해야합니다. '$ scope', '$ location'에주의하십시오.

+0

이것이 필요한 이유는 무엇인가? 왜이 구문은 작동하지 않습니다 : 'angular.module ('App '). 컨트롤러 "CommentsFormCtrl", ($ scope, $ routeParams, $ http, CommentService) ->' – Kaspar

관련 문제