Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Which image path to be used to show static images #552

@Sampath-Lokuge

Description

@Sampath-Lokuge

Hi,

I need to show the static image on home page using this template. I have tried as shown below.But it is not working. When I asked this on Stackoverflow where they're saying to use assets folder. But I cannot see such thing on this template. So can you tell me how to handle static image with this template.If you can provide an example then it's highly appreciated.

I have put the question on Stackoverflow. But none of the solutions are working with this template.

\home\home.component.html

<img src="{{heroImageUrl}}" style="height:30px">

home.component.ts

import { Component } from '@angular/core';

@Component({
    selector: 'home',
    template: require('./home.component.html')
})
export class HomeComponent {

    public heroImageUrl ="./image/employee_management.jpg";
}

Error :

it says like this Failed to load resource: the server responded with a status of 404 (Not Found).May be a path issue.how can I give it correctly ? Image is there as shown below.

image

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