I am trying to upload-file using angularFileUpload
in php,but i will get
this error in angular.
[$injector:unpr] Unknown provider: $uploadProvider
I have tried answer from this question but no luck.
Here is my app.js
angular.module('app',[
'ui.router','angularFileUpload'
])
.config(['$urlRouterProvider','$stateProvider',function($urlRouterProvider,$stateProvider){
$urlRouterProvider.otherwise('/');
$stateProvider
.state('home',{
url:'/',
templateUrl:'templates/home.html',
controller:'homeCtrl'
})
.state('login',{
url:'/login',
templateUrl:'templates/login.html',
controller:'loginCtrl'
})
.state('register',{
url:'/register',
templateUrl:'templates/register.html',
controller:'registerCtrl'
})
}]);
Controller.js
angular.module('app')
.controller('registerCtrl',['$upload',function($scope,$http,$state,$upload){
]});
But still I get this error.
Error: [$injector:unpr] Unknown provider: $uploadProvider