When I do click on compose button to open email template (e.g; as given in gmail when click to compose mail), using Auxiliary Route for multiple template in single page.
Question is : how to remove or Deactivate this Auxiliary Route, when click on cross button.
app.ts
@RouteConfig([
{
path: '/',
name: 'OpportunityList',
component: OpportunityComponent,
useAsDefault: true
},
{
path: '/detail',
name: 'Detail',
component: DetailComponent
},
{
aux: '/mailer',
name: 'Mailer',
component: MailerComponent
}
])
app.html
<a [routerLink]="['/', ['Mailer'] ]" >Compose</a>
mailer.component.ts
export class MailComponent implements OnInit{
closeEmail(){
console.log("please suggest me to Deactivate this template")
}
}
mailer.component.html
<div class="header with-bord">
<h3 class="title">New Message <a (click)="closeEmail()" class="close"><i class="fa fa-times"></i></a></h3>
</div>