Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working code suddenly stopped working
Message
From
03/12/2015 10:43:30
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01628321
Message ID:
01628384
Views:
34
>>>Hi everybody,
>>>
>>>I don't remember when I was last testing this functionality, but it surely worked before just fine.
>>>
>>>This is our html code:
>>>
>>>
>>><div class="col-lg-3 col-md-3 panel-container">
>>>                        <ul class="nav nav-pills nav-stacked">
>>>                            <li class="active"><a data-toggle="pill" href="#general" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateGeneralForm.$invalid]">@Labels.general</a></li>
>>>                            <li><a data-toggle="pill" href="#startingValues" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateStartingValuesForm.$invalid]">@Labels.startingValues</a></li>
>>>                            <li><a data-toggle="pill" href="#globalSettings" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateGlobalSettingsForm.$invalid]">@Labels.globalSettings</a></li>
>>>                            <li><a data-toggle="pill" href="#autoPassValidation" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateAutoPassValidationForm.$invalid]">@Labels.autoPassValidation</a></li>
>>>                            <li><a data-toggle="pill" href="#scanningRestrictions" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateScanningRestrictionsForm.$invalid]">@Labels.scanningRestrictions</a></li>
>>>                            <li><a data-toggle="pill" href="#autosales" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateAutoSalesForm.$invalid]">@Labels.autoSales</a></li>
>>>                            <li><a data-toggle="pill" href="#autosaleOptions" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateAutosaleOptionsForm.$invalid]">@Labels.autoSaleOptions</a></li>
>>>                            <li><a data-toggle="pill" href="#remoteValidation" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateRemoteValidationForm.$invalid]">@Labels.remoteValidation</a></li>
>>>                            <li><a data-toggle="pill" href="#inhouseCards" ng-show="currentTemplate.tmplType == 1" ng-class="{true: 'invalid-tab', false: ''}[form.editTemplateInHouseCardsForm.$invalid]">@Labels.inHouseCards</a></li>
>>>                        </ul>
>>>                    </div>
>>>
>>>The idea is that if the tab is invalid, it is shown in red color (the class invalid-tab). Today this is not working. Even when tab is invalid, it shows in normal color.
>>>
>>>The most recent change I did was installing VS 2015 latest update. I'm going to test that functionality now on my older laptop but I suspect VS 2015 has nothing to do with it, most likely it's something in angularjs.
>>>
>>>But just in case, do you know why that would suddenly broke?
>>>
>>>Thanks in advance.
>>
>>I may be missing something but the syntax for ng-class looks completely wrong. Shouldn't it be ng-class="{invalid-tab : true}" (rather than expression:style)?
>
>The syntax was correct although needlessly complex.

Hmm. Not the syntax I use. Can you point me to the documentation for that variation ?


> The problem turned to be in the site.css - the class was correctly applied, but I've changed the class definition to apply on children. I don't remember the purpose of that change which was done in March - apparently the effect of it I found now. Anyway, I fixed it.

That was going to be my next suggestion :-}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform