To display a dialog component on the main component page after clicking a button, I used directives in the following way:
Within the template:
<button id="goToTasksCases" class="btn btn-success btn-lg" (click)="doShowStartNewCase($event)">START A NEW CASE</button>
<modal-new-case></modal-new-case>
Within the component:
@Component({
selector: 'case-index'
})
@View({
templateUrl: 'client/app/case/case.index.html',
directives : [ModalNewCaseComponent]
})
export class CaseIndexComponent {
doShowStartNewCase(event: any) {
// how can I access the ModalNewCaseComponent
}
}
After receiving a callback from a Rest service, I need to set some values for the child component (ModalNewCaseComponent
). How can I achieve this with the current setup?