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.
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');
}]);
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'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With