How to pass an angle dependence Js and Ionic

1

I'm trying to pass a dependency on my module to use a unique filter, I need to filter names in my Views . What happens is this: when I do this, in my controller, without creating routes on my system, that's for sure.

angular.module("myApp,['ui.filters']")
       .controller("papaRoca",function($scope,Data, $location). 

You can see that I put the ['ui.filters'] dependency. Without the routes in my system it works, but when I put the routes for page navigation, if I put this dependency in my controller ['ui.filters'] , of the error.

Why does this happen? When creating routes on the system are the dependencies created in another location?

    
asked by anonymous 12.07.2016 / 05:59

2 answers

0

Note that you are injecting the library into your module name, you have to separate the two parts with a comma.

 angular.module('myApp', ['ui.filters'])
      .controller("papaRoca", function($scope, Data, $location) {

  });
    
12.07.2016 / 20:15
0

DiogoAugusto did not even work with someone told me that library of conflict with and $ stateProvider injection. I do not see exits now does anyone know some way to filter data to not repeat name with inoic and angular js?

    
13.07.2016 / 03:28