javascript - Angular Cli + jquery.counterup pluggin settup -
i'm truing add jquery.counterup pluggin angular cli project.
my angular.cli.json
"../node_modules/jquery/dist/jquery.js", "../node_modules/waypoints/lib/jquery.waypoints.js", "../node_modules/jquery.counterup/jquery.counterup.js"
app.component.ts
import { component, afterviewinit } '@angular/core'; declare var waypoint :any; @component({ selector: 'app-root', templateurl: './app.component.html', styleurls: ['./app.component.scss'] }) export class appcomponent implements afterviewinit { public ngafterviewinit() { $('.counter').counterup({ delay: 100, time: 1000 }); var waypoint = new waypoint({ element: document.getelementbyid('about'), handler: function(direction) { alert('you have scrolled thing'); } }); } }
my html
<section class="section" data-anchor="menuanchor3"> <div class="fp-tablecell container"> <h1>easy install !</h1> <div class="code-block"> <span class="counter">1,234,567</span> </div> </div> </section>
no errors appear in console counter not triggering?
Comments
Post a Comment