arconsis Blog

Kategorie : design-pattern

Attribute directive with Angular 6 CLI

Sometimes you want to apply the same style or behaviour to multiple DOM elements. For example you want to highlight a element while it's hovered with the mouse and unhighlight it when hover is removed. The bad way would be to write the logic in every component. Angular 6 has something called…


Generic component with Angular 6 CLI

The @Input() decorator in Angular 6 We will use the @Input() decorator to create a component which is kind of "dumb" it has only one purpose, display data! With dumb i mean, there should be no logic at all inside this component. The logic and the data should be mutated only from one…