Skip to content

img! macro not working #532

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

Closed
frankli-dev opened this issue Sep 4, 2020 · 1 comment
Closed

img! macro not working #532

frankli-dev opened this issue Sep 4, 2020 · 1 comment

Comments

@frankli-dev
Copy link

Thanks to the great seed framework!

I think this is a simple issue but I can't find the reason why the img! macro not working
Here is my codebase

fn view(model: &Model) -> Node<Msg> {
    div![
        img![C!["logo"], attrs!{At::Src => "https://a.com/a.png"}],
        input![
            attrs! {
                At::Placeholder => "Enter your name..."
            },
            input_ev(Ev::Input, Msg::ChangeText),
        ],  
   ]
}

It shows an input but I can't see the logo. (https://a.com/a.png is just a temporary)
Also, if I check the dev tools, I can't find any img tag

Could anyone let me know what I mistake, please?
Thanks in advance.

@MartinKavik
Copy link
Member

oh. I think it was a cache issue
I've fixed by clearing the cache and rebuild my wasm

  • @frankli on Seed chat

Solution: seed-rs/seed-rs.org#71 (comment)

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