nstudio / nativescript-checkbox

NativeScript plugin for checkbox UI component
Other
119 stars 56 forks source link

Not working with tns-core-modules 2.5+ #16

Closed bferreirainfo closed 7 years ago

bferreirainfo commented 7 years ago

After update to ns-core-modules 2.5 im getting

could not load view: CheckBox Type error: Cannot read property 'id' of undefined at resolverPromise(nativescript-angular/zone.js/dist/zone-nativescript.js:416:31

my setup: ts import { registerElement } from "nativescript-angular/element-registry"; registerElement("CheckBox", () => require("nativescript-checkbox").CheckBox);

html

bradmartin commented 7 years ago

That seems to be specific to the angular piece of NativeScript and not an issue with this plugin itself. You might want to raise an issue on that repo, but since you're using 2.5 and currently 2.3 is the release and 2.4 is coming soon it's likely a non issue but something inconsistent with the masters youre running. Hope that helps.

On Wed, Nov 2, 2016, 9:09 PM bferreirainfo notifications@github.com wrote:

After update to ns-core-modules 2.5 im getting

could not load view: CheckBox Type error: Cannot read property 'id' of undefined at resolverPromise(nativescript-angular/zone.js/dist/zone-nativescript.js:416:31

my setup: ts import { registerElement } from "nativescript-angular/element-registry"; registerElement("CheckBox", () => require("nativescript-checkbox").CheckBox);

html <CheckBox class="loginField" style="font-size:16px;" text="Exibir Senha" checked="false">

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bradmartin/nativescript-checkbox/issues/16, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhJjaHmNikzrzGyQSzRj2tcFMp3Kqks5q6UI_gaJpZM4Kn8aE .

hdeshev commented 7 years ago

The problem isn't related to Angular (just zone.js masking exceptions, as usual). It seems there is a breaking change introduced with the latest non-uniform borders support feature: we do not export borderWidthProperty from ui/styling/style anymore. That causes the property handler registration code to fail.

@hamorphis, any ideas?

bradmartin commented 7 years ago

I would've never found that, thanks @hdeshev.

hamorphis commented 7 years ago

The borderWidth property was replaced by four new properties: borderTopWidth, borderRightWidth, borderBottomWidth and borderLeftWidth: https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/styling/style.d.ts

triniwiz commented 7 years ago

Fixed https://github.com/bradmartin/nativescript-checkbox/pull/17