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
Post a Comment