I'm currently working on a component in Angular that includes an input parameter:
import {Component, Input} from '@angular/core';
@Component({
selector: 'comment',
template: `
<div class="col-lg-6 col-md-6 col-xs-6 thumb">
<div class="post-owner">
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object rounder" [src]="imageURI" >
</a>
</div>
</div>
</div>
</div>`
})
export class CommentCompoent {
@Input() imageURI = "";
}
In the parent component, I passed an image path to it like this:
<comment [imageURI]='image_path'></comment>
However, when I run it, it gives me an error message:
EXCEPTION: Error: Uncaught (in promise): Quotes are not supported for evaluation!
Any suggestions on how to resolve this issue?
Update: Removing [imageURI]='image_path'
in the parent component solved the problem and displayed the rest of the component perfectly.