0

Angular generally allows you to specify certain directives as either custom HTML tags or as attributes on a standard html tag or as classes to be included on a tag. Does angular UI Bootstrap Pagination follow these principles? If so, is there an example of specifying pagination as an attribute?

2 Answers 2

2

works here

the pagination directive restricted as EA

<div pagination total-items="bigTotalItems" page="bigCurrentPage" max-size="maxSize" class="pagination-sm" boundary-links="true"></div>
Sign up to request clarification or add additional context in comments.

Comments

1

The answer to your first question is in the source

.directive('pagination', ['$parse', 'paginationConfig', function($parse, config) {
  return {
    restrict: 'EA',

where restrict: 'EA' means the directive can be used both as an element and as an attribute.

As for an example, you can just edit the examples on their demo using the "edit in plunker link"

See plnkr for an edited example with the first pagination from their demo.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.