javascript - Angular provider not loading -


I have some problems loading my providers.

Setup is as follows:

  • NG-view with main.html
  • In main.html the controller MainCtrl
  • I have many instructions that require access to the same data, so I am using a provider to get it.
  • I am called an item provider, which is a generic provider that is anything based on the parameters of writing, reading, etc.
  • I have another provider who Storage storage of items which offer ways to obtain specific things from datastos

    When I reference the data in my controller (which references the item reference:) "error : [$ Injector: unpredictable] unknown prada I: ItemStorage "

    But when I remove the reference to the data for ItemStorage, the application is fully executed (some undefined errors pointing to the empty object)

    According to JSHint I do not have any syntax errors. I have my provider file below. Any help would be appreciated!

      angular.module ('myApp') .provider ('itemstorage', function) (this. $ Get = function () {}; // some other methods}). Provider ('data', function {item item}} {var item store = {}; this .release = item storage. Ore, this $ get = function () {return} {foo: function () {return.getItemFromStorage (};} ; this.getItemFromStorage = function (item) {return Storage.getItem (item);};})   

    This is only a limited subset of code.

    writes it Time I have read something .. It is not possible to update a provider during run-time? Can I not call any method to save something for local storage?

    Finally I have something that can hold data for the current user which is accessible and can be updated by any element so that every other element can be updated. Is it possible?

    When comparing the document, it will appear that you have not given your FU name, and this issue can be Try to do something:

      angular.module ('myApp'). Received ( 'itemstorage', function before Storejpradata () {  

    this. $ Get = function () {

     }   

    })

    You may also want to add it to the config << p

      myApp.config (["itemstoragepro provider", function (item store provider) {  

    }]);

    taken from loose

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -