JavaScript Display image using angular 2 display image using matplotlib,display image using javascript,display image

I am very new to angular 2 I am stuck here where i have to display an image for which I'm using relative path­­­­­­­­­­­­­­­­­­­­

<img src="./../images/publicVideo1.PNG">

but getting the below error

null:1 GET http://localhost:4200/null 404 (Not Found)

enter image description here

The above is the app structure where I have image in images folder which I'm trying to access from public-videos.component.html

I dont understand where I'm wrong Any help would be appreciated.

Answer:1

create one dir assets in src directory. and move images directory into assets and then you can access image like that. image not found in app folder because we need to set path in assets[] block in the .angular-cli.json. we need set path into asset block we access it. does this help.

<img src="../../assets/images/publicVideo1.PNG">

angular-cli.json

enter image description here

Answer:2

Try like this one here

<img [src]="defaultProfilePic" />

and in your component

defaultProfilePic: string ='assets/profile.png';

if this doesn't work it is because of the relative path you used. If you are using visualCode it will help you finding the exact path.

Answer:3

Mention the path relative to your index.html. If your index.html is inside the src folder, then try this:

<img src="./app/images/publicVideo1.PNG">

Answer:4

I am trying to send an by the user dropped file to the php upload script using ajax. I don't know why it doesn't work, nothing happens if I drop an image. (Why's no one answering?) So this is the ...

I am trying to send an by the user dropped file to the php upload script using ajax. I don't know why it doesn't work, nothing happens if I drop an image. (Why's no one answering?) So this is the ...

  1. sending file upload via ajax
  2. file upload sending
  3. send file upload via ajax jquery

The options for configuring the GetHTTP processor look like they would work for connecting to a third party API. I need to send the username (available), password (available) and a 3rd string value ...

The options for configuring the GetHTTP processor look like they would work for connecting to a third party API. I need to send the username (available), password (available) and a 3rd string value ...

  1. nifi processor
  2. nifi processor list
  3. nifi processor example
  4. nifi processor logs
  5. nifi processor scheduling
  6. nifi processor concurrent tasks
  7. nifi processor development
  8. nifi processor group
  9. nifi processor run schedule
  10. nifi processor lifecycle
  11. nifi processor properties
  12. nifi-processor-bundle-archetype
  13. nifi processor requires upstream connection
  14. nifi processor documentation
  15. nifi processor replace text example
  16. nifi processor state
  17. nifi processor github
  18. nifi processor api
  19. nifi processor group variables
  20. nifi processor run once

I want my users to be able to upload images to my website. They don't have to be logged in. I have a custom Page template where I would like to perform this. And I have the following chunk of code ...

I want my users to be able to upload images to my website. They don't have to be logged in. I have a custom Page template where I would like to perform this. And I have the following chunk of code ...

  1. wordpress uncaught typeerror $ is not a function
  2. wordpress uncaught typeerror object(...) is not a function
  3. wordpress uncaught typeerror
  4. wordpress uncaught typeerror jquery(...).sortable is not a function
  5. wordpress uncaught typeerror codemirror.fromtextarea is not a function
  6. wordpress uncaught typeerror $(...).datepicker is not a function
  7. wordpress uncaught typeerror $.cookie is not a function

I need to get the HTML of the whole page, with the current values of all inputs in their value="...". I've tried this: document.getElementById("htmlId").innerHTML; and this: $('html').html(); but ...

I need to get the HTML of the whole page, with the current values of all inputs in their value="...". I've tried this: document.getElementById("htmlId").innerHTML; and this: $('html').html(); but ...

  1. jquery html with current element
  2. html copyright with current year
  3. html input with current date
  4. html current date
  5. html current year
  6. html current time
  7. html current version
  8. html current url
  9. html current date and time
  10. html current timestamp
  11. html current
  12. html current directory
  13. html current year footer
  14. html current month
  15. html current date and time display
  16. html current path
  17. html current location
  18. html current page
  19. html current page url
  20. html current datetime