J
J
jack3d2015-05-22 15:29:09
JavaScript
jack3d, 2015-05-22 15:29:09

How to output data from data-ng-model?

$scope.timeoutDelay = {minutes: 0, seconds: 0};

Output 3c0d4d06e6.jpg
Output like this L4AkE10h7a9Kmq.jpg. And you need 00:00.
Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
ivankomolin, 2015-05-22
@ivankomolin

It is necessary that $scope.timeoutDelay contains {minutes: 00, seconds: 00};
0 will not turn into 00 by itself.

S
Sergey Gavrilov, 2015-05-22
@FireVolkhov

You need to write a small formatter https://docs.angularjs.org/api/ng/type/ngModel.NgM...

A
Alexander, 2015-05-22
@lebonnet

function firstNull(num)
{
    if (num < 10) return '0' + num.toString();
    else return num.toString();
}

leading zero, returns true string, not number

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question