DEVHIDE
  • Home (current)
  • About
  • Contact
  • Cookie
  • Home (current)
  • About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy
  • TOS
Login Or Sign up

What does the "let-modal" tag do?

1k Views Asked by Menelaus At 24 July 2022 at 14:49 2025-12-05T11:57:04.505000

So, I've been using a basic ng-bootstrap modal for an Angular app.

<ng-template #content let-modal>
    <div class="modal-header">
      <h4 class="modal-title" id="modal-basic-title"></h4>
      <button type="button" class="btn-close" aria-label="Close" (click)="modal.dismiss('Cross click')"></button>
    </div>
    
    <div class="modal-body">
      <form>
        <div class="mb-3">
          <label for="dateOfBirth">Date of birth</label>
        </div>
      </form>
    </div>

    <div class="modal-footer">
      <button type="button" class="btn btn-outline-dark" (click)="modal.close('Save click')">Save</button>
    </div>
  </ng-template>
  
  <button class="btn btn-lg btn-outline-primary" (click)="open(content)">Launch demo modal</button>
  
  <hr> 

To work, it needs the let-x tag, which then that x it used to control functions like dismiss and close. Why is that? Why can't an instance of Ngb-Modal handle these things? And most importantly, how does this all work?

ng-bootstrap ng-bootstrap-modal
Original Q&A
0

There are 0 best solutions below

Related Questions in NG-BOOTSTRAP

  • Why won't a [(ngModel)] of a radio group bind?
  • How to implement Bootstrap 4 for Angular 2 ngb-pagination
  • Angular2 Bootstrap Datepicker format date issue
  • How to pass parameteres to modal?
  • How to set the width of the dropdown in the typeahead module
  • dropdown toggle issue in navbar with ng-bootstrap (4) angular 2 (cli)
  • NgbDropdown doesn't stay open
  • How to customize the CSS for ng-bootstrap controls using Angular 2 / Bootstrap 4
  • Getting started directly on ng-bootstrap (without working on 1.5.8)
  • NgbModal error when trying to close
  • ng-bootstrap for Angular 2 datepicker does not popup the calendar
  • Issue with prepopulating ng-bootstrap's typeahead whilst relying on model driven forms
  • Angular 2 Alerts that work with Bootstrap 4, similar to Toastr
  • Display content on ngbModal when clicking on table row - Angular 2
  • stop closing the modal by clicking backdrop or outside the modal

Related Questions in NG-BOOTSTRAP-MODAL

  • Angular NgbModal, how to correctly close a modal window?
  • Carousel slide-ngb-slide-1 is not showing properly in ng-bootstrap
  • Angular 9 :: NgbModal is navigating on load
  • Angular NgBootstrap Modal How to listen to backdrop click
  • ng-bootstrap modal uses default change detection -- is there away to enforce on push?
  • Modal not opened properly programmatically in angular
  • ngFor on table rows with clickable modal windows. How to do that modal windows with ng-bootstrap .open() function?
  • Close active modal
  • ngFor with ngBootstrap NgbModal Open - Angular Bootstrap
  • How to remove the shadow of the draggable item in Angular
  • How to open a ng-bootstrap modal from the left or right side?
  • Open NgbModal within a Promise will not autofocus within the new modal
  • Should I manually call unsubscribe() on NgbModal @Output() EventEmitter subscription?
  • Why the dynamically generated inputs return NaN?
  • Unable expend options of Years in the ng Bootstrap datepicker in Angular

Trending Questions

  • UIImageView Frame Doesn't Reflect Constraints
  • Is it possible to use adb commands to click on a view by finding its ID?
  • How to create a new web character symbol recognizable by html/javascript?
  • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
  • Heap Gives Page Fault
  • Connect ffmpeg to Visual Studio 2008
  • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
  • How to avoid default initialization of objects in std::vector?
  • second argument of the command line arguments in a format other than char** argv or char* argv[]
  • How to improve efficiency of algorithm which generates next lexicographic permutation?
  • Navigating to the another actvity app getting crash in android
  • How to read the particular message format in android and store in sqlite database?
  • Resetting inventory status after order is cancelled
  • Efficiently compute powers of X in SSE/AVX
  • Insert into an external database using ajax and php : POST 500 (Internal Server Error)

Popular # Hahtags

javascript python java c# php android html jquery c++ css ios sql mysql r reactjs

Popular Questions

  • How do I undo the most recent local commits in Git?
  • How can I remove a specific item from an array in JavaScript?
  • How do I delete a Git branch locally and remotely?
  • Find all files containing a specific text (string) on Linux?
  • How do I revert a Git repository to a previous commit?
  • How do I create an HTML button that acts like a link?
  • How do I check out a remote Git branch?
  • How do I force "git pull" to overwrite local files?
  • How do I list all files of a directory?
  • How to check whether a string contains a substring in JavaScript?
  • How do I redirect to another webpage?
  • How can I iterate over rows in a Pandas DataFrame?
  • How do I convert a String to an int in Java?
  • Does Python have a string 'contains' substring method?
  • How do I check if a string contains a specific word?
.

Copyright © 2021 Jogjafile Inc.

  • Disclaimer
  • Privacy
  • TOS
  • Homegardensmart
  • Math
  • Aftereffectstemplates