Get a reference to a component of current route in Angular 2's router?
问题 Is there a clean way to get a reference to the component of current route? This seems to work, but seems very hacky: this.router.currentInstruction. component.componentType.prototype.somePropertyOrFunction(); 回答1: In fact, you don't have access to the component instance associated to the current route with your expression. You only get the component type. That's why you need to use the prototype but you get a reference to function and don't reference to methods of the component instance. The