I'm working on a section of my webpage that features multiple tabs, each requiring a partial and controller to function properly. My goal is to dynamically switch the ng-include and ng-controller based on the currently selected tab.
One challenge I've encountered is that Angular expects the controller to reference the actual controller itself, rather than just a string with the controller's name.
I've experimented with various approaches, but so far I haven't been able to make it work.
$scope.tab.active = {
view: 'activetabview.html',
controller: 'ActiveTabController'
}
<section ng-include src="tab.active.view" ng-controller="tab.active.controller">
</section>