2

I am getting an error when I added 'ngFileUpload' in my module. I have used

var app = angular.module('myApp', ['ngFileUpload']);

And in route page:

angular.module('myApp')
  .config(function ($stateProvider) {
    $stateProvider
      .state('dashboard', {
        url: '/dashboard',
        templateUrl: 'app/dashboard/dashboard.html',
        controller: 'DashboardCtrl'
      })
  });

Error is :

Error: [$injector:modulerr] Failed to instantiate module umxApp due to:
[$injector:unpr] Unknown provider: $stateProvider
http://errors.angularjs.org/1.4.1/$injector/unpr?p0=%24stateProvider
minErr/<@http://localhost:9000/bower_components/angular/angular.js:68:12
createInjector/providerCache.$injector<@http://localhost:9000/bower_components/angular/angular.js:4255:19
getService@http://localhost:9000/bower_components/angular/angular.js:4402:39
invoke@http://localhost:9000/bower_components/angular/angular.js:4434:1
runInvokeQueue@http://localhost:9000/bower_components/angular/angular.js:4349:11
loadModules/<@http://localhost:9000/bower_components/angular/angular.js:4358:11
forEach@http://localhost:9000/bower_components/angular/angular.js:336:11
loadModules@http://localhost:9000/bower_components/angular/angular.js:4339:5
createInjector@http://localhost:9000/bower_components/angular/angular.js:4265:11
bootstrap/doBootstrap@http://localhost:9000/bower_components/angular/angular.js:1621:20
bootstrap@http://localhost:9000/bower_components/angular/angular.js:1642:1
angularInit@http://localhost:9000/bower_components/angular/angular.js:1536:5
@http://localhost:9000/bower_components/angular/angular.js:28289:5
jQuery.Callbacks/fire@http://localhost:9000/bower_components/jquery/dist/jquery.js:3099:10
jQuery.Callbacks/self.fireWith@http://localhost:9000/bower_components/jquery/dist/jquery.js:3211:7
.ready@http://localhost:9000/bower_components/jquery/dist/jquery.js:3417:1
completed@http://localhost:9000/bower_components/jquery/dist/jquery.js:3433:2

http://errors.angularjs.org/1.4.1/$injector/modulerr?p0=umxApp&p1=%5B%24injector%3Aunpr%5D%20Unknown%20provider%3A%20%24stateProvider%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.4.1%2F%24injector%2Funpr%3Fp0%3D%2524stateProvider%0AminErr%2F%3C%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A68%3A12%0AcreateInjector%2FproviderCache.%24injector%3C%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4255%3A19%0AgetService%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4402%3A39%0Ainvoke%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4434%3A1%0ArunInvokeQueue%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4349%3A11%0AloadModules%2F%3C%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4358%3A11%0AforEach%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A336%3A11%0AloadModules%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4339%3A5%0AcreateInjector%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A4265%3A11%0Abootstrap%2FdoBootstrap%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A1621%3A20%0Abootstrap%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A1642%3A1%0AangularInit%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A1536%3A5%0A%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fangular%2Fangular.js%3A28289%3A5%0AjQuery.Callbacks%2Ffire%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3099%3A10%0AjQuery.Callbacks%2Fself.fireWith%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3211%3A7%0A.ready%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3417%3A1%0Acompleted%40http%3A%2F%2Flocalhost%3A9000%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3433%3A2%0A 

return new ErrorConstructor(message);

I am unable to upload image with angularjs. Can anyone answer me what is my problem?

Can any one help me how to upload image with angularjs and back-end nodejs in step by step. I find many but not getting proper answer.

1 Answer 1

1

you are not injecting ui-router as a dependency in your app do this .

var app = angular.module('myApp', ['ngFileUpload','ui.router']);
Sign up to request clarification or add additional context in comments.

2 Comments

When i added 'ui.router' error is removed but my template page is not running.
could be another problem create a fiddle or elaborate more

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.