In your stackblitz add the following function to your component class. It receives the event as parameter and calls the stopPropagation
function on it.
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular';
stop(event: Event) {
event.stopPropagation();
}
}
In your template do
Comp1
Navigate to comp2 (Nested)
See my stackblitz fork.