Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot display images #48

Open
smlombardi opened this issue May 9, 2018 · 2 comments
Open

Cannot display images #48

smlombardi opened this issue May 9, 2018 · 2 comments

Comments

@smlombardi
Copy link

Using the documentation example:
<div class="thumbnail-image" [ngStyle]="{'background': 'url('abc.jpg')no-repeat scroll center center / 80px 80px'}"></div>

Throws a compile error:
Parser Error: Missing expected } at column 22 in [{'background': 'url('abc.jpg')no-repeat scroll center center / 80px 80px'}]

I've tried every combination of background, using a simple background: red compiles.

Also, what's with the abc.jpg? How to use the image in the loop let image of images? My images is an array of image url strings.

I can get images to at least display if I use this instead:

<div class="thumbnail-image">
     <img src="{{image}}"  alt="">
</div> 

But this doesn't seem to be the way it's designed?

@bekzatsk
Copy link

@bekzatsk
Copy link

[<div class="thumbnail-image" [ngStyle]="{'background': 'url(' + abc.jpg + ')no-repeat scroll center center / 80px 80px'}"></div>]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants