Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ngModel doesn't work on both platforms #15

Closed
alexandruantonica opened this issue Dec 15, 2017 · 5 comments
Closed

ngModel doesn't work on both platforms #15

alexandruantonica opened this issue Dec 15, 2017 · 5 comments
Labels

Comments

@alexandruantonica
Copy link

Hi @PeterStaev

I tried your examples in my app but I realised that the variable I added in [(ngModel)] is always null or empty, depends on init value.

component.html

<MaskedTextField class="input-code" [(ngModel)]="code"  keyboardType="phone" mask="0-0-0-0-0" returnKeyType="next" (returnPress)="continue()"></MaskedTextField>

nativescript : 3.3.1
tns-android : 3.3.1
tns-ios : 3.3.0

Let me know if you need more info about my app & test case.

@akaco
Copy link

akaco commented Jan 25, 2018

Have same issue on [(ngModel)] is always null

Angular 5.2.1
nativescript : 3.4.1
tns-android : 3.4.1
tns-ios : 3.4.1

@PeterStaev
Copy link
Owner

Hey @akaco , I've tried in the demo-ng project and I cannot simulate it using the latest version of the plugin. So make sure you are using the latest version of the plugin.

@akaco
Copy link

akaco commented Jan 27, 2018

Hi this is my setup
in package.json

"nativescript-masked-text-field": "^2.0.1",

in compnent.ts
public smsNumber = '0';
in Html file

<MaskedTextField class="input input-border phoneInput" mask="00000000000" [(ngModel)]="smsNumber" keyboardType="phone" row="0"
                               col="1"></MaskedTextField>

and I get Null for ngModel smsNumber

@PeterStaev
Copy link
Owner

@akaco I cannot simulate the problem with the demo-ng app in the repo. I would suggest you nuke your node_modules and platforms folders and then try again.

@mauricioribeiro
Copy link

I'm having the same issue here, but using Vue. Any suggestion?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants