I am a beginner in angular..I have a requirement to avoid hard coding any names in the app.. I have used
myapp.constant("constantName",
{
"name":"name1"
});
to avoid hard coding html..I would also like to avoid hard coding controller names also...
example :
myapp.controller("IndexCtrl",function($scope){});
Instead of having the string IndexCtrl
in the controller, is there any way to define something like this
myapp.controller(constantName.controller,function($scope){})
where the constant will be
myapp.constant("constantName",
{
"name":"name1",
"controller" : "IndexCtrl"
});
Thanks for the help :)