GithubHelp home page GithubHelp logo

Duration Value about ionic-durationpicker HOT 3 CLOSED

lakhsmi avatar lakhsmi commented on June 1, 2024
Duration Value

from ionic-durationpicker.

Comments (3)

webdevius avatar webdevius commented on June 1, 2024

@lakhsmi The directive binds the duration value to whatever variable name you pass in the idp-output attribute. It will give out the value in seconds.

from ionic-durationpicker.

lakhsmi avatar lakhsmi commented on June 1, 2024

@kshaaban- OK. Here is my issues on initialization I set the value $scope.mileRunDuration = 10 i,e it shows 0:10 as duration time later on I update the to 1:45 as duration time when try to print the $scope.mileRunDuration it is getting the old one not updated one in the controller any thing wrong with me.

from ionic-durationpicker.

webdevius avatar webdevius commented on June 1, 2024

@lakhsmi No, nothing is wrong with you - As a matter of fact, when I wrote the docs/demo, I missed the fact that two-way data binding between parent and children scopes on primitive data types (the duration in seconds is an integer) doesn't work as one would expect .

Try passing an object property instead of a scope variable and things should work just fine. i.e.

// Controller:
$scope.durations = {
    mileRun: 10
}

// Template:
<ionic-durationpicker idp-label="Example 1" idp-output="durations.mileRun">
</ionic-durationpicker>

I'll update the docs to reflect that accordingly.
Thank you for bringing that up 👍

from ionic-durationpicker.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.