I'm currently using this code in my HTML page. In my angular module, I have imported all the necessary components. However, I keep encountering an error related to the backdrop. Can someone please assist me with this issue? I am unfamiliar with backdrops and would appreciate an explanation of why this error occurs.
<div class="animated fadeIn">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header">
<i class="fa fa-align-justify"></i> Bootstrap Modals
</div>
<div class="card-block">
<!-- Button trigger modal -->
<button type="button" class="btn btn-secondary" data-toggle="modal" (click)="smallModal.show()">
Launch small modal
</button>
</div>
</div>
</div>
<!--/.col-->
</div>
<!--/.row-->
</div>
<div bsModal #smallModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Modal title</h4>
<button type="button" class="close" (click)="smallModal.hide()" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="smallModal.hide()">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
Below is my .ts file
import { Component, OnInit, ViewChild } from '@angular/core';
import { ModalDirective } from 'ng2-bootstrap/modal/modal.component';
@Component({
selector: 'app-mso-user-profile',
templateUrl: './mso-user-profile.component.html',
styleUrls: ['./mso-user-profile.component.css']
})
export class MsoUserProfileComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}