0

Very popular issue:

Unknown provider: nProvider <- n <- $http <- $templateFactory <- $view <- $state

I use MVC Bundling for this.

How to read this message?

Does it mean that $state requires $view that requires $templateFactory etc.?

juco
  • 6,331
  • 3
  • 25
  • 42
BotanMan
  • 1,357
  • 12
  • 25
  • 1
    Yes, your understanding is correct. – runTarm Aug 16 '14 at 16:06
  • 1
    more code required to solve your problem – V31 Aug 16 '14 at 16:54
  • Actually I managed to find the problem. I have added all scripts to index.html. And then start to minificate them with MVC bundle part by part. After this I have found the incorrect for minification script. – BotanMan Sep 25 '14 at 11:36

1 Answers1

0

It was a problem in some external directives. So I go through all of them and fixed syntax of service injections:

from

app.service('myService', function($scope, $animate) {});

to

app.service('myService', ['$scope', '$animate', function($scope, $animate) {}]);

To understand where is the problem I have added all scripts to index.html. And then start to minificate scripts with MVC bundle part by part. After this I have found the incorrect for minification script.

BotanMan
  • 1,357
  • 12
  • 25