Skip to content

is it possible to pass dynamic value by using angular 4 app. #5

@MohamedSahir

Description

@MohamedSahir

I know its a jquery plugin , still i have some confusion whether its possible or not.

I have an angular4 component when the page loads it shows the total visitors count increasing on the page .

How to communicate dynamic pass inside numscroller.

app.component.ts

import { Component ,OnInit} from '@angular/core';

declare var $:any;

@component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit{
totalvisitors = 1000; // dynamic value
dayvisitors = 10; // dynamic value
}

app.component.html working fine with static value data-max ="1000"
<span class='numscroller' data-min='1' data-max="1000" data-delay='5' data-increment='10'>1000</span>

when using dynamic passing

<span class='numscroller' data-min='1' data-max="totalvisitors" data-delay='5' data-increment='10'>1000</span> 
<span class='numscroller' data-min='1' data-max=" dayvisitors" data-delay='5' data-increment='10'>1000</span>

Getting Error and Is it possible to use numscroller.js inside ng4 component dynamic value passing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions