i try to using modal dialog bootstrap with router-outlet angular 4 and get error “Uncaught Error: Zone already loaded.”
Here my script: master-golongan.component.ts
import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';
import { Title } from '@angular/platform-browser';
@Component({
selector: 'app-master-golongan',
templateUrl: './master-golongan.component.html',
styleUrls: ['./master-golongan.component.css'],
})
export class MasterGolonganComponent implements OnInit {
golList: any;
constructor(private title: Title) {
this.title.setTitle('Daftar Golongan | Inventory Management System');
}
ngOnInit() {
}
}
master-golongan.component.html
<a class="btn btn-success btn-xs " data-toggle="modal" data-target="#myModal" routerLinkActive="active"
routerLink="new-edit-golongan">
<i class="fa fa-plus"></i> Golongan Baru</a>
<div class="modal" id="myModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<router-outlet></router-outlet>
</div>
</div>
</div>
new-edit-golongan.component.html
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
and has an error like picture below
How to call router-outlet angular 4 in modal dialog bootstrap ? how to solve it ?