Problem
repeating a style is common while coding , for example: - container , font-style buttons ..etc.
As angular component is separated (CSS and HTML) , We face a repetitive code and if we need to change a style we needs to change many time for minor change -maybe-
โจSolution
styleUrls: ['./component1.scss',
'../component2.scss']
@Component({
selector: 'component',
templateUrl: './component.html',
styleUrls: ['./component1.scss',
'../component2.scss']
})
export class Component implements OnInit {
ngOnInit(): void {
}
}
so if the style we need is existing in a different component we can add the path of CSS , better than copying the style code
Top comments (2)
Hey, that was a nice read, you got my follow, keep writing ๐
I appreciate it , thank you