Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Angular question
Message
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01601977
Message ID:
01602060
Views:
37
This message has been marked as a message which has helped to the initial question of the thread.
>In the templatesSearchController I made the following change
>
>
>  $scope.table = searchScreenService.getTable('Descrip', [
>                { name: 'Descrip', displayName: 'Description' }, { name: 'TmplType', displayName: 'Type' }
>
>This seems to work OK (e.g. extra property didn't change a thing, didn't cause exception).
>
>Now, my task is in the template
>
>
><tr style='-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;'>
>    <th ng-repeat="column in table.columns" ng-click="sort(column)">
>        {{ column.name }}
>        <span class="pull-right" href="#" ng-show="column.name === table.sort">
>            <i ng-class="{'icon-chevron-down': table.dir === 'asc', 'icon-chevron-up': table.dir === 'desc'}"></i>
>        </span>
>    </th>
></tr>
>
>
>Change {{column.name}} to something that would first check if displayName property exists, then use it otherwise use column.name.
>
>Do you know how to adjust that code here?
>

You could probably do something like this:
<span ng-if="column.displayName == ''">{{column.name}}</span>
<span ng-if="column.displayName != ''">{{column.displayName}}</span>
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform