Answer the question
In order to leave comments, you need to log in
How to correctly write styles in ngStyle in Angular?
i do it but error
[ngStyle]="{'backgrounImage':'url(' +url +')', 'backgrounPosition': offsetX + 'px' offsetY + 'px', 'windth': windth + 'px', 'height':height + 'px' }"
error NG5002: Parser Error: Missing expected } at column 74 in [{'backgrounImage':'url(' +url +')', 'backgrounPosition': offsetX + 'px' offsetY + 'px', 'windth': windth + 'px', 'height':height + 'px' }] in C:\Users\Anriko\Desktop\angular-home-work\my-app\src\app\[email protected]:40
Answer the question
In order to leave comments, you need to log in
backgroun d Image
In general, I recommend describing styles in this way, it reads better
https://stackblitz.com/edit/angular-ivy-3nwfzl?fil...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question