Reputation: 1329
I'm encountering this error: Uncaught Error: [$injector:unpr] Unknown provider: eProvider <- e after a successful deployment to Heroku
I'm using angular social share btw: https://github.com/djds4rce/angular-socialshare
removing the run
function and module name djds4rce.angular-socialshare
do not cause error but I badly need that for Fb sharing.
//= 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');
});
Any idea(s)? Thanks.
Upvotes: 5
Views: 4018
Reputation: 41
Thats correct I have to change my coffescript file to
@HomeCtrl = ['$scope', '$location', ($scope, $location) ->
$scope.things = ['Angular', 'Rails 4.1', 'Working', 'Together!!']
]
in order to make it work. Pay attention to '$scope', '$location'
Upvotes: 2
Reputation: 115541
Rails minifies the js, so you have to use a different syntax:
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');
}]);
Upvotes: 6