Can't display static image in the same folder as the component in Angular

Can't display static image in the same folder as the component in Angular

Content Index :

Can't display static image in the same folder as the component in Angular
Tag : angular , By : apple
Date : January 12 2021, 07:00 PM

This might help you You need to put the image in assets folder and then reference it in your html like this
<img src="assets/img/logo.png">

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Display static image in public folder (rails 4)

Tag : ruby-on-rails , By : yogan
Date : March 29 2020, 07:55 AM
will help you I just tested this out in one of my applications, adding an image to the public folder, and was able to render it in view by using:

how to display image from static django folder in vue using v-html

Tag : django , By : user184975
Date : March 29 2020, 07:55 AM
To fix the issue you can do Both lines of code below work exactly the same way in Django: The second method works for Vue too. so its convenient to use the second method.
<img src="{% static 'app1/emojis/celebration.png' %}">
<img src="/static/app1/emojis/celebration.png" > 

GET image files from static folder and display them in client app

Tag : javascript , By : Sanoran
Date : March 29 2020, 07:55 AM
it fixes the issue I am storing images in a static folder in my express server app. So far this works as expected. The code that matters for this is as follows , Why not just use an element?
const img = document.createElement('img');
img.src = `${MY_URL}/${imageId}`;
fetch(`${MY_URL}/${imageId}` /*...*/)
  .then(res => res.blob())
  .then(blob => {
    const img = document.createElement('img');
    img.src = URL.createObjectURL(blob);

How can I display and download an image which is located outside of the static folder?

Tag : python , By : Tony Siu
Date : December 25 2020, 07:30 AM

unable to display image from static folder in node js

Tag : node.js , By : robinator
Date : March 29 2020, 07:55 AM
should help you out New to Node.js and trying to display image from static folder using , The problem is that this code:
const directory: string = path.join(__dirname, '/uploads/')
const directory: string = path.join(__dirname, '/uploads');
app.use('/uploads', express.static(directory));
Related Posts Related QUESTIONS :
  • Angular array says its an object?
  • Enable full template type-checking in Angular application
  • How to isolate private static functions in Angular / Typescript?
  • Angular error when changing font color from API value
  • Angular | How do i show an object inside the form of another component
  • Angular - generate array of objects and display the data
  • How to load component into another
  • Set Node options when running with Angular-CLI
  • View does not update when calling function from other component Angular + NativeSript(6)
  • The fields in my form are not binding to the model attributes in Angular
  • Can someone help me out here, can't get the routing to work properly, keep getting 404
  • Providing/Injecting third party service to component while angular component unit testing
  • Using Reactive Forms to send value from field wrapped in compulsory object
  • how to get http response from typescript post
  • how to get public IP in Angular Project
  • Access Nested Models from function Angular
  • Angular 7 - Set the data source for the Select/dropdown box
  • Angular Material Dialogue issue - Error: The selector "dialog-result-example-dialog" did not match any element
  • BodyParser doesn't parse - but everything looks right to me. How to resolve `Cannot read property of undefined`
  • Deep Linking with IOS and Android Nativescript
  • Angular 8 + IE 11: Some polyfills are missed
  • How access form attributes from component?
  • Pass all FromGroup control values to another FormGroup
  • In Angular 7, how do I access the component that emitted an event?
  • Not able to call a method when a feature/marker is selected in OpenLayers
  • How to Implement Nested NG If else conditions in Angular 8
  • Want only single true or false value from observers
  • How to add react custom element in angular 6
  • StaticInjectorError(AppModule)[MainComponent -> MatDialog]
  • Loop through data set showing undefined
  • Why does the Angular Material table mat-paginator pagesize not work?
  • Can Web API get input from angular client for confirmation and continue execution?
  • Will the angular build include the spec file size?
  • Meta tags angular 7
  • Can't find file on stackblitz Angular project
  • AngularFire Auth exchange FireBase token for my platform's token before re-direct
  • Angular 8 Component / Service: How to retrieve data from async function in service
  • Add a control to a dynamic Angular reactive form
  • Looking to Add Role-Based Authentication System
  • Angular 7/8, 1 dependency is interfering with another one, How to avoid the loading of a deep dependency while inside a
  • Compiler errors (resolving) when compiling after addition of Firebase Admin SDK
  • wrapper observable event on top of http call
  • Nginx container does not send requests to back-end
  • ngOnInit starts before APP_INITIALIZER is done
  • How to trigger a data service call in Angular
  • Where do I declare my external service in my app.module.ts file?
  • event propagation cdk drag
  • use argument as object property in angular
  • How to create new object in redux selector and return it
  • How can I show my own text status before i switch my toggle button while using mat-slide-toggle
  • Get the API response and store the data in to an array
  • How to obtain previous and new value from Angular mat-select?
  • Send payload data with POST/PUT/PATCH requests to Sentry.io
  • Angular 8 not working in IE 11 and Safari browser
  • How to create function name from json in Angular 7
  • Im trying to push values from an array with objects to another array with objects
  • Got an error when I add "changeDetectionStrategy" to my app
  • Angular typescript object undefined at start leading to undefined error
  • Failed: Template parse errors: There is no directive with "exportAs" set to "bsDatepicker" while run
  • Error: Can't resolve all parameters for setupPlatform: (?, [object Object], [object Object])
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com