I am trying to use ng-repeat and a controller to dynamically load tab content.
Controller code:
angular.module('ogn.userprefs').controller('UserprefsController', ['$scope',
function($scope) {
$scope.tabs = [
{ title: 'Personal Information', content: "ng-include=''modules/userprefs/views/personalinfo.html''"},
{ title: 'Sign In & Security', content: 'modules/userprefs/views/signin_security.html'},
{ title: 'Account Preferences', content: 'modules/userprefs/views/accountprefs.html'}
];
}]);
HTML code:
<div ng-show="subnav" class="userprefs">
<div ng-controller="UserprefsController" class="subnav-tabs">
<!--<tabset>
<tab heading="Personal Information">
<div ng-include="'modules/userprefs/views/personalinfo.html'"></div>
</tab>
<tab heading="Sign In & Security">
<div ng-include="'modules/userprefs/views/signin_security.html'"></div>
</tab>
<tab heading="Account Preferences">
<div ng-include="'modules/userprefs/views/accountprefs.html'"></div>
</tab>
</tabset>-->
<tabset>
<tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active">
{{tab.content}}
</tab>
</tabset>
</div>
</div>
The HTML code that has been commented out is how I called the content in my tab before, using hg-include. I want to switch to an ng-repeat and call it through the controller, but all that is coming up is text that follows content:. What can I replace after content to call my html pages?
Any help is appreciated! Thanks in advance!