Using Angular 2, what is the difference between using the following 2 options for passing a variable value to a style? Are there pros and cons, or is it just personal choice, or is one more flexible/meant for other uses.
Option 1
<div [ngStyle]="{ 'background-image': 'url(' + image + ')'}">
Option 2
<div [style.background-image]="'url(' + image + ')'">
Related:
Attribute property binding for background-image url in Angular 2