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;








2















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.










share|improve this question






























    2















    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.










    share|improve this question


























      2












      2








      2


      1






      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.










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 12:48









      tracertracer

      16711 bronze badges




      16711 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          1
















          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






          share|improve this answer



























          • 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










          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
          );



          );














          draft saved

          draft discarded
















          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









          1
















          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






          share|improve this answer



























          • 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















          1
















          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






          share|improve this answer



























          • 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













          1














          1










          1









          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






          share|improve this answer















          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







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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

















          • 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








          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.




















          draft saved

          draft discarded















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript