Skip to content

img! macro not working #532

Closed
Closed
@frankli-dev

Description

@frankli-dev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions