javascript - How to inject filter in app config -


i have filter want inject module config set value state title etc.

.config(["$stateprovider","$filter", function ($stateprovider,$filter) { $stateprovider  .state('app.home', {     url: '/',     data: {         title: $filter('myfilter')('trans.abc'),     },     views: {         "content@app": {             templateurl: '---',             controller: 'dummycontroller'         }     },     resolve: {     } })` 

here filter

app.filter('myfilter',gettranslate);  function gettranslate($rootscope){    return function(text){    return 'test title';     } } 


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -