angular.number-input icon indicating copy to clipboard operation
angular.number-input copied to clipboard

How to add a placeholder instead of initial number?

Open phlex89 opened this issue 9 years ago • 4 comments

I would like to use a placeholder in input instead of number 0 by default.

phlex89 avatar Aug 19 '16 10:08 phlex89

I temporally resolved passing a new parameter (placeholder: "@?placeholder",) to the directive and changing: if (isNull($scope.start)) $scope.start = $scope.min; to if (isNull($scope.start)) $scope.start = $scope.placeholder;

phlex89 avatar Aug 19 '16 10:08 phlex89

Sorry for the late reply; I don't actually get notified when an issue is created.

Your solution seems like a reasonable one; I will implement it as soon as I can. Thanks for sharing!

E: In your case, I'm assuming you wanted to show a text placeholder, not a number?

cohenadair avatar Sep 22 '16 14:09 cohenadair

Yes it was my obj.

Now i'm not using this directive anymore (my customer changed the project).

Thanks anyway.

phlex89 avatar Sep 22 '16 14:09 phlex89

No problem. I like the idea, though so I'd like to keep this issue open for now.

cohenadair avatar Sep 22 '16 14:09 cohenadair