我是棱角分明的新手.
我使用了包ng2-bootstrap使用了bootstrap模式.
我的查看文件是
<div bsModal #lgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title pull-left">Area Master</h4>
<button type="button" class="close pull-right" (click)="lgModal.hide();" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Modal Content here...
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Add</button>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我需要知道如何从组件(类型脚本文件)中显示/隐藏此模式.
输入脚本文件是
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { Router } from '@angular/router';
import { FormGroup, Validators, FormBuilder, FormControl } from '@angular/forms';
import { Area …Run Code Online (Sandbox Code Playgroud)