Skip to main content

SelectArticleOnClick

Overview

Directive that selects an article on click to be displayed into the stack panel using a open's specific strategy: 'stack' or 'replace'.

info

Default open's strategy is 'stack'

Usage

Using host directives attribute

some-component.ts
@Component({
...
imports: [ SelectArticleOnClickDirective ],
hostDirectives: [
{
directive: SelectArticleOnClickDirective,
inputs: ['article', 'strategy']
}
]
})
export class SomeComponent {
article = {};
strategy: SelectionStrategy = "replace";
}

Directly in the HTML template

<div selectArticleOnClick [article]="{}" strategy="stack" }>