I am facing an issue where I want to include a controller in my code, with the controller's name being included in the object received from ng-repeat.
Here is the array:
$scope.components = [
{
name: "box",
controller: "BoxCtrl"
}
/*other components*/
];
And here is the corresponding HTML code:
<ul>
<li ng-repeat="c in components" ng-controller="{{c.controller}}">
{{c.name}}
</li>
</ul>
However, I am encountering the following error.
Does anyone have any suggestions on how to resolve this issue?