You should use ViewEncapsulation
Just add to your component encapsulation: ViewEncapsulation.None
:
import { Component, ViewEncapsulation } from "@angular/core";
@Component({
selector: '....',
templateUrl: '....',
styles: [`
.ag-theme-fresh .ag-row-selected {
background-color: #1428df !important;
}
`],
encapsulation: ViewEncapsulation.None
})