I have a controller like this :
.controller('candidatureStartCtrl', function ($scope, $parse, fileUploadCtrl) {
//...code
fileUploadCtrl.uploadFile($scope.identityDocUpload);
//...code
}
in candidatureStartCtrl I'm calling another controller which is fileUploadCtrl
to use its function uploadFile()
.
but I get this error in console even though I imported the fileUploadCtrl
js in the index.html :
Error: [$injector:unpr] Unknown provider: fileUploadCtrlProvider <- fileUploadCtrl <- CandidatureStartCtrl
this is a fiddle with the same concept :
http://jsfiddle.net/7tzXh/143/
How can I solve this ?