-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular directive for 1.x #79
Comments
It was actually when implementing an Angular directive that did not discriminate on its element that I came to need #80. If that's of any use to you, here is a WIP on how I set up Cleave within a directive. That can maybe give an idea of a slightly complex use case. |
@MattiSG I'm on a cleave directive this weekend, which will only need you add it to the input field. Will let you know then to see if it can fit your need. |
@nosir I'm curious if you'd have some kind of ETA for this? Or if you think you have something that makes sense but don't intend on releasing it any time soon, maybe you could share what you have and I could use that as starting point? Much appreciated |
@OClement It's almost there, |
angular2 component 👍 |
Okay guys, Angular 1.x directive released.
As for Angular2 component, it's in the plan but won't be here soon. |
@nosir I took a quick look and noticed you were using $watch to achieve the desired behaviour It is using Formatters/Parsers on ngModelController instead of watchers It still is a work in progress: http://plnkr.co/edit/PfRVzZqL5htotsPNq8xQ?p=preview |
@OClement cool, will have a look at night. Don't like watching either. |
From the link I sent above: controller.$parsers.push(formatter.getRawValue.bind(formatter)); To use the |
Okay, thanks @MattiSG @OClement , changes released:
Doc: https://github.com/nosir/cleave.js/blob/master/doc/angularjs-directive-usage.md |
Coming soon... but for 1.x
The text was updated successfully, but these errors were encountered: