Closed Eugeny closed 5 years ago
Just noticed you're listening to tabsChanged$ on the AppService. There's actually an API that lets you automatically discover new and closed terminal tabs - TerminalDecorator:
abstract class TerminalDecorator { attach (_terminal: TerminalTabComponent): void { } detach (_terminal: TerminalTabComponent): void { } }
You only need to provide it in your module after declaring:
{ provide: TerminalDecorator, useClass: MyDecorator, multi: true },
Here's how it's used in the clickable-links plugin: https://github.com/Eugeny/terminus-clickable-links/blob/master/src/decorator.ts#L7
Just noticed you're listening to tabsChanged$ on the AppService. There's actually an API that lets you automatically discover new and closed terminal tabs - TerminalDecorator:
You only need to provide it in your module after declaring:
Here's how it's used in the clickable-links plugin: https://github.com/Eugeny/terminus-clickable-links/blob/master/src/decorator.ts#L7