ryuKKu- / angular-particle

Particle.js rewritted for Angular2/4
56 stars 22 forks source link

div appears but no animation #6

Open halukkaramete opened 6 years ago

halukkaramete commented 6 years ago

Hi I went thru the steps on the angular 4.4 set up that I got on the local machine.

I see the div ( coming from the particles ) pushing down my content. But it's got nothing in it. No errors on the console.

Chrome's Inspecter gives me this on that div. What could be wrong do you guys think?

<particles _ngcontent-c7="" ng-reflect-width="100" ng-reflect-height="100">
        <div class="particles-container">
            <canvas d-particles="" style="width: 100%; height: 100%;" width="1378" height="690"></canvas>
        </div>
    </particles>
halukkaramete commented 6 years ago

Fixed.

Instructions need to be corrected.

you have it as

<particles [style]="style" [width]="width" [height]="height" [params]="params">
</particles>

it should be

<particles [style]="myStyle" [width]="width" [height]="height" [params]="myParams">
</particles>
halukkaramete commented 6 years ago

Another correction suggestion I'd like to make is this:

change these

'top': 0,
'left': 0,
'right': 0,
'bottom': 0,

to

'top': '0px',
'left': '0px',
'right': '0px',
'bottom': '0px',

you do need the px in there.

last but not the least, this is a fantastic work. And I want to thank you and ( all who have contributed to it ) for making it available to the angular 2+ world.