The AngularStrap tabs functionality works great when the site/app is run with the grunt serve command, but when the grunt serve:dist command is used the tabs disable feature does not work.
In particular, the 'disabled' flag works with grunt serve, with the relevant tabs being properly disabled, but with grunt serve:dist the tabs are not disabled.
The following code added to a standard angular-fullstack generated project will reproduce this issue (adding 'mgcrea.ngStrap' to the client dependencies also and installing it via bower) - the final tab is not disabled as it should be when run via grunt serve:dist:
main.controller.js:
'use strict';
angular.module('tabTestApp')
.component('main', {
templateUrl: 'app/main/main.html',
controller: function($scope, $templateCache) {
$scope.tabs = [
{title:'Select Video', content: 'test 0'},
{title:'Edit Video', content: 'test 1'},
{title:'Edit Audio', content: 'test 2'},
{title:'Play back', content: 'test 3', disabled: 'true'},
];
$scope.tabs[1].disabled = 'false';
$scope.tabs[2].disabled = "false";
$scope.tabs[3].disabled = true;
$scope.tabs.activeTab = 0;
}
});
main.html:
<!-- Partial for view1
This partial contains tabs using AngularStrap tab mechanism -->
<div class="bs-docs-section" >
<!-- bsActivePane is optional - see angular-starp documentation -->
<div bs-active-pane="tabs.activeTab" bs-tabs>
<div ng-repeat="tab in tabs" title="{{ tab.title }}" name="{{ tab.title }}" disabled="{{ tab.disabled }}" ng-bind="tab.content" bs-pane>
</div>
</div>
</div>
The easiest way to understand the problem may be with some images of the results.
This is what the site looks like when the command 'grunt serve' is used:
And this is what it looks like when the command grunt serve:dist is used (see the last tab below which is set to disabled in the code above is not disabled in this case, although it is above):
This is a tricky issue as it might be a Angular-fullstack issue or it might be an AngularStrap issue - my feeling is that it is more likely the former.
If anyone has either seen this issue, or know a good tool/method to debug this type of grunt build issue, any help would be gratefully appreciated!