how to dynamically set size selector input for ngb paginationHow to implement Bootstrap 4 for Angular 2 ngb-paginationHow to give style to ngb-bootstrap tabAngular 2 ng-bootstrap ngb-tabset and ngb-tab - how load the data from dynamicallyHow to implement ngb-pagination in angular4How to change next-text,previous-text in ngb-paginationHow to center ngb-pagination in angular4?Set min time to ngb-timepicker Angular 4ngb-tabset & dynamically created tabsHow to assign dynamic value in the value field of ngb-progressbar in angular 6how to change ngb-pagination background color
Plot irregular circle in latex
What is the source of "You can achieve a lot with hate, but even more with love" (Shakespeare?)
Why is the year in this ISO timestamp not 2019?
Why cannot a convert make certain statements? I feel they are being pushed away at the same time respect is being given to them
Other than good shoes and a stick, what are some ways to preserve your knees on long hikes?
how to know this integral finite or infinite
Can an infinite series be thought of as adding up "infinitely many" terms?
Is it possible that the shadow of the moon is a single dot during solar eclipse?
Why would a fighter use the afterburner and air brakes at the same time?
How to set a tolerance level for equality constraints
How many people need to succeed in a group check with three people?
How to convert Mn2O3 to Mn3O4?
What did the first ever Hunger Games look like?
Is it better to use mosfet with gate driver IC or mosfet with lower VGs on
Talk about Grandpa's weird talk: Who are these folks?
What are the typical trumpet parts in classical music?
LeetCode: Top K Frequent Elements C#
Impossible Scrabble Words
Neta Revai is achzareyos?
Tikz: How to use multiple parameters in pic?
What is the origin of the "being immortal sucks" trope?
Is there a theorem in Real analysis similar to Cauchy's theorem in Complex analysis?
Why is the return value of the fun function 8 instead of 7?
Answer not a fool, or answer a fool?
how to dynamically set size selector input for ngb pagination
How to implement Bootstrap 4 for Angular 2 ngb-paginationHow to give style to ngb-bootstrap tabAngular 2 ng-bootstrap ngb-tabset and ngb-tab - how load the data from dynamicallyHow to implement ngb-pagination in angular4How to change next-text,previous-text in ngb-paginationHow to center ngb-pagination in angular4?Set min time to ngb-timepicker Angular 4ngb-tabset & dynamically created tabsHow to assign dynamic value in the value field of ngb-progressbar in angular 6how to change ngb-pagination background color
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have the below code working fine
<ngb-pagination class="d-flex justify-content-end" [collectionSize]="100" [pageSize]="5"
[(page)]="currentPage" [maxSize]="5" [rotate]="true" (pageChange)="getToPage(currentPage)" [boundaryLinks]="true"
[ellipses]="true" size="lg"></ngb-pagination>
As I read from the official documentation link - https://ng-bootstrap.github.io/#/components/pagination/api, it is said the size input can be set to "lg" or "sm" in html.
I want it to be responsive which means for small screens size should take "sm" and for medium plus screens it should take "lg".
The link doesn't have the information of how to change size dynamically.
Doing with CSS is an alternative way but I want it to be done ng Bootstrap way.
angular ng-bootstrap
add a comment
|
I have the below code working fine
<ngb-pagination class="d-flex justify-content-end" [collectionSize]="100" [pageSize]="5"
[(page)]="currentPage" [maxSize]="5" [rotate]="true" (pageChange)="getToPage(currentPage)" [boundaryLinks]="true"
[ellipses]="true" size="lg"></ngb-pagination>
As I read from the official documentation link - https://ng-bootstrap.github.io/#/components/pagination/api, it is said the size input can be set to "lg" or "sm" in html.
I want it to be responsive which means for small screens size should take "sm" and for medium plus screens it should take "lg".
The link doesn't have the information of how to change size dynamically.
Doing with CSS is an alternative way but I want it to be done ng Bootstrap way.
angular ng-bootstrap
add a comment
|
I have the below code working fine
<ngb-pagination class="d-flex justify-content-end" [collectionSize]="100" [pageSize]="5"
[(page)]="currentPage" [maxSize]="5" [rotate]="true" (pageChange)="getToPage(currentPage)" [boundaryLinks]="true"
[ellipses]="true" size="lg"></ngb-pagination>
As I read from the official documentation link - https://ng-bootstrap.github.io/#/components/pagination/api, it is said the size input can be set to "lg" or "sm" in html.
I want it to be responsive which means for small screens size should take "sm" and for medium plus screens it should take "lg".
The link doesn't have the information of how to change size dynamically.
Doing with CSS is an alternative way but I want it to be done ng Bootstrap way.
angular ng-bootstrap
I have the below code working fine
<ngb-pagination class="d-flex justify-content-end" [collectionSize]="100" [pageSize]="5"
[(page)]="currentPage" [maxSize]="5" [rotate]="true" (pageChange)="getToPage(currentPage)" [boundaryLinks]="true"
[ellipses]="true" size="lg"></ngb-pagination>
As I read from the official documentation link - https://ng-bootstrap.github.io/#/components/pagination/api, it is said the size input can be set to "lg" or "sm" in html.
I want it to be responsive which means for small screens size should take "sm" and for medium plus screens it should take "lg".
The link doesn't have the information of how to change size dynamically.
Doing with CSS is an alternative way but I want it to be done ng Bootstrap way.
angular ng-bootstrap
angular ng-bootstrap
asked Mar 28 at 12:48
tracertracer
16711 bronze badges
16711 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
Declare a variable for the current size size: string = 'sm';
, put it in template [size]="size"
and change whenever you need.
https://stackblitz.com/edit/angular-l4cfzf?file=app%2Fpagination-size.html
Edit
To react to window reaize you need to set up Host Listener
@HostListener('window:resize', ['$event'])
onResize(event)
// check/set the size
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55398070%2fhow-to-dynamically-set-size-selector-input-for-ngb-pagination%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Declare a variable for the current size size: string = 'sm';
, put it in template [size]="size"
and change whenever you need.
https://stackblitz.com/edit/angular-l4cfzf?file=app%2Fpagination-size.html
Edit
To react to window reaize you need to set up Host Listener
@HostListener('window:resize', ['$event'])
onResize(event)
// check/set the size
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
add a comment
|
Declare a variable for the current size size: string = 'sm';
, put it in template [size]="size"
and change whenever you need.
https://stackblitz.com/edit/angular-l4cfzf?file=app%2Fpagination-size.html
Edit
To react to window reaize you need to set up Host Listener
@HostListener('window:resize', ['$event'])
onResize(event)
// check/set the size
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
add a comment
|
Declare a variable for the current size size: string = 'sm';
, put it in template [size]="size"
and change whenever you need.
https://stackblitz.com/edit/angular-l4cfzf?file=app%2Fpagination-size.html
Edit
To react to window reaize you need to set up Host Listener
@HostListener('window:resize', ['$event'])
onResize(event)
// check/set the size
Declare a variable for the current size size: string = 'sm';
, put it in template [size]="size"
and change whenever you need.
https://stackblitz.com/edit/angular-l4cfzf?file=app%2Fpagination-size.html
Edit
To react to window reaize you need to set up Host Listener
@HostListener('window:resize', ['$event'])
onResize(event)
// check/set the size
edited Mar 28 at 13:27
answered Mar 28 at 13:18
DimanoidDimanoid
3,1532 gold badges23 silver badges36 bronze badges
3,1532 gold badges23 silver badges36 bronze badges
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
add a comment
|
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
thanks for the reply but actually i need it to set when i resize the screen
– tracer
Mar 28 at 13:21
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
Then you need to subscribe to window events, see the edit part.
– Dimanoid
Mar 28 at 13:27
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55398070%2fhow-to-dynamically-set-size-selector-input-for-ngb-pagination%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown