I have multiple tabs, the name of the tab should appear in two lines.
Please find the demo here I tried to use \n while assigning the tabname but it didn't recognized.Any suggestions? js code:
var myApp = angular.module('tabs', [ 'ui.bootstrap']);
myApp.controller('tabsctrl', function ($rootScope,$scope) {
$rootScope.tabName ='MyTab Name';
$rootScope.tabValue="tab1Value";
$scope.applicationData = {};
$scope.activeModule = "tab1Value";
$scope.programModules=[{"tabName":"Tab1 Name \n Active Modules","tabValue":"tab1Value"},{"tabName":"Tab2 Name \n NonActive modules","tabValue":"tab2Value"}];
//code
});
In the tabname Active Modules and Non Active modules should be shown in second line of the tab as below.
Tab1 Name Tab2 Name
Active Modules Active Modules
--EDIT--- Please find the updated link with the code mentioned in the below answer by jsalonen. I am getting the below error which can be seen in the console when plunker is opened,any suggestions to resolve this error:
angular.js:12477 Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: tabName in pg.tabNames, Duplicate key: string:e, Duplicate value: e
``` instead. – Jack Parkinson Jun 20 '17 at 21:23