@@ -1108,10 +1108,56 @@ dependency [bootstrap-vertical-tabs](https://github.com/dbtek/bootstrap-vertical
1108
1108
It is not needed for tabs on top.
1109
1109
1110
1110
The ` title` option is a bit special in ` tabarray` , it defines the title
1111
- of the tab and is considered a angular expression. The expression is evaluated
1111
+ of the tab and it is interpolated so you can use expression it. Its interpolated
1112
1112
with two extra variables in context: **value** and **$index**, where **value**
1113
1113
is the value in the array (i.e. that tab) and **$index** the index.
1114
1114
1115
+ You can include multiple expressions or mix expressions and text as needed:
1116
+ Ex:
1117
+ ` ` ` javascript
1118
+
1119
+ {
1120
+ " form" : [
1121
+ {
1122
+ " type" : " tabarray" ,
1123
+ " title" : " My {{ value.name }} is:" ,
1124
+ }
1125
+ ]
1126
+ }
1127
+
1128
+ ` ` `
1129
+
1130
+ #### Deprecation Warning
1131
+ Before version 0.8.0 the entire title was evaluated as an expression and not interpolated.
1132
+ If you weren't using expressions in your form titles then no changes are needed.
1133
+
1134
+ However, if your tabarray titles contain implicit Angular expressions like this:
1135
+ ` ` ` js
1136
+ {
1137
+ " form" : [
1138
+ {
1139
+ " type" : " tabarray" ,
1140
+ " title" : " value.name || 'Tab '+$index" ,
1141
+ }
1142
+ ]
1143
+ }
1144
+ ` ` `
1145
+
1146
+
1147
+ Then you should change this to explicit expressions by wrapping them with the Angular expression
1148
+ delimiter "{{ }}":
1149
+ ` ` ` js
1150
+ {
1151
+ " form" : [
1152
+ {
1153
+ " type" : " tabarray" ,
1154
+ " title" : " {{ value.name || 'Tab '+$index }}" ,
1155
+ }
1156
+ ]
1157
+ }
1158
+ ` ` `
1159
+
1160
+
1115
1161
Example with tabs on the top:
1116
1162
1117
1163
` ` ` javascript
@@ -1143,7 +1189,7 @@ function FormCtrl($scope) {
1143
1189
{
1144
1190
type: " tabarray" ,
1145
1191
tabType: " top" ,
1146
- title: " value.nick || ('Tab '+$index)"
1192
+ title: " {{ value.nick || ('Tab '+$index)}} "
1147
1193
key: " subforms" ,
1148
1194
remove: " Delete" ,
1149
1195
style: {
0 commit comments