amitmahida92 / ng4-loading-spinner

Angular 4 custom async loading spinner.
MIT License
69 stars 31 forks source link

Change src #45

Open buskami-dev opened 6 years ago

buskami-dev commented 6 years ago

Hi there,

How can I change the animation? I wanted to use my own image, can I just point to my images folder? I tried to use the [template] but did not work

buskami-dev commented 6 years ago

I got it working it’s just that the image does not appear centered as the original animation. What can I do to make my image to appear in the center of the page like the animation does?

Edj209 commented 6 years ago

In the template string you can define a css class such as 'custom-spinner-template' and make your css centering changes there.

in your component ts file:

template: string =<img class="custom-spinner-template" src="<path>/yourImage.gif" />;

in your component css file:

.custom-spinner-template { top: 43% !important; left: 45% !important; opacity: 1 !important; }