Check out example codes for "conditional src angular". It will help you in understanding the concepts better.

Code Example 1

Arrow="../../../assets/images/shared/desktop/arrow.svg";
ArrowW="../../../assets/images/shared/desktop/arrow copy.svg";


 <img [src]="arrow==0? ArrowW : Arrow " alt="arrow">

Learn ReactJs, React Native from akashmittal.com