How to call controller in state of AngularJS from another folder contain controller? -
i'm facing problem. how call controller state, while controller placed on folder named , controllers (as shown in following picture)?
there way add controller in state like:
url:"/whatever", templateurl:'whatever/init', controller :function(depencies){ perform function }
but want reduce code in state, , want put controller folder, , can integrate them separate locations.
this picture clear understanding:
as long include controllers/articles.js
in page change state config use registered controller name:
url:"/whatever", templateurl:'whatever/init', controller :'articles'
Comments
Post a Comment