@Component({
selector: 'dashboard',
templateUrl: 'dashboard.html',
styleUrls: ['dashboard.scss'],
})
.dashboard {
color: red;
}
:host {
color: red;
}
Можно ли использовать `dashboard` селектор в `dashboard.scss`.
The :host
selector is the only way to target the host element. You can't reach the host element from inside the component with other selectors because it's not part of the component's own template. The host element is in a parent component's template.