-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat(pagination): add classes to assist with styling #4142
Conversation
👍 |
<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}"><a href ng-click="selectPage(page + 1, $event)">{{::getText('next')}}</a></li> | ||
<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}"><a href ng-click="selectPage(totalPages, $event)">{{::getText('last')}}</a></li> | ||
<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText('first')}}</a></li> | ||
<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}"><a href ng-click="selectPage(page - 1, $event)" class="pagination-prev">{{::getText('previous')}}</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to add the class to the anchor element or should it be on the li element like the rest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intention is on the li
because one can then target either the li
or the anchor tags with the CSS, whereas putting it on the anchor tag still leaves the same problem if for some reason someone wanted to hook into the li
tag for custom styling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wesleycho, I think @RobJacobs was referring to that three of the classes were added to <li>
elements and two were on <a>
. Specifically, pagination-prev
and pagination-next
are on anchor tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's just a mistake then.
- Add classes to allow the user to target the styles of component with more specificity Closes angular-ui#4130
ee17761
to
f93dec7
Compare
Fixed issues. |
LGTM, part deux. |
Closes #4130