Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Default values for numbers in custom widgets do not work #345

Open
sidamos opened this issue Dec 31, 2018 · 0 comments
Open

Default values for numbers in custom widgets do not work #345

sidamos opened this issue Dec 31, 2018 · 0 comments
Labels

Comments

@sidamos
Copy link

sidamos commented Dec 31, 2018

I have a custom widget with a setting of type Number. When I configure some number as default value, I get a runtime error when Habpanel renders a new widget of this type:

vendor.js:119 Error: [ngModel:numfmt] http://errors.angularjs.org/1.5.11/ngModel/numfmt?p0=14
at vendor.js:6
at Array. (vendor.js:183)
at vendor.js:293
at m.$digest (vendor.js:144)
at m.$apply (vendor.js:147)
at HTMLAnchorElement. (vendor.js:281)
at eg (vendor.js:37)
at HTMLAnchorElement.d (vendor.js:37)

This is how I use the config value (labelFontSize):
<span ng-style="{'font-size': (config.labelFontSize) + 'pt'}">{{config.name}}</span>
Workaround: Use type of String.

@ghys ghys added the bug label Dec 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants