infrabel / themes-gnap

Standardized build to produce web themes for use with GNaP.
http://gnap.io/
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

gnap-timepicker launches digest error #119

Open timdhondt opened 9 years ago

timdhondt commented 9 years ago

When we use the built-in gnap-timepicker and use a function or custom-filter in the time-attribute, we receive the $digest iteration error.

HTML:

    <div ng-repeat="activity in vm.activities">
        <span gnap-timepicker class="time-picker" time="activity.startTime | secondsToDate"></span>
    </div>

Filter:

function secondsToDate() {
    return function (seconds) {
        if (seconds !== undefined && seconds !== null) {
            return new Date(seconds * 1000);
        } else {
            return new Date();
        }
    }
}

At first, we thought we might by using to many ng-repeat's in our code, but even when we strip those, the issue still stands.