Comments (10)
Hello @Mr-Negative!
Thank you for an interest in this module. However, I'm not sure I understood your use case and the problem. Could you please create a Plunk to demonstrate the issue? You can start with this: http://plnkr.co/edit/g2MDXv81OOBuGo6ORvdt?p=preview
Then I will be glad to dig into it and will try to help you.
Cheers!
from angular-input-modified.
http://plnkr.co/edit/2NxkIWQnqOOyXjMTdVw3?p=preview when you change value on " Form modified:" input it will trigger alert. when input will change by writing in full name input - it won't
from angular-input-modified.
I see. But, why do you need to bind modification state via ngModel
and monitor it via ngChange
? What are you trying to achieve in the end?
from angular-input-modified.
First of all im new in angular so maybe question is stupid;-). i have form that is created in modal, and when i click "ok" button i need have information in parent if it was modified. In Your examples you disable save button, i need it to return this data from model to function "ok". if i would do ng-click="ok({{variation_form.modified}})" it generates Error: [$parse:syntax] Syntax Error: Token 'variation_form.modified' is unexpected, expecting [:] at column 6 of the expression [ok({{variation_form.modified}})] starting at [variation_form.modified}})].
from angular-input-modified.
It looks like you've found a very weird way to solve this problem. First of all look at some good module for dialogue windows. Like this one: http://likeastore.github.io/ngDialog/#. Your modal form will run inside of an isolated dialogue scope. You could pass any data from this scope to your parent application via promises. Look at this: https://github.com/likeastore/ngDialog#scopeclosethisdialogvalue.
from angular-input-modified.
thx. i'm working on somebody elses code so i can't use this dialog.module but i found workaround and in next projects i will use this module. Thanks for help.
from angular-input-modified.
@Mr-Negative sure thing. The approach should be the same with any other dialogue module if it supports at least the minimal functionality.
from angular-input-modified.
It was written by this "dev" :-/. But i have one question "around this". Is it possible to attach maybe some watch or something like this to modified value at all? it would be usefull for an example triggering custom validators for whole form only when modified
from angular-input-modified.
You should be able to add watches standard way, e.g.: $scope.$watch('formName.modified', onFormModified);
or $scope.$watch('formName.fieldName.modified', onFieldModified);
.
from angular-input-modified.
Hi i found answer so i put it here so maybe somebody else find this post and find it usefull. $watch doesnt work well with modals [ui-bootsrap ones] becouse of isolated dialogue scope. But if you do something like this - https://gist.github.com/rnkoaa/8333940 it would work on this plugin also.
Most important bit is to name it like this "form.userForm" and
var ModalInstanceCtrl = function ($scope, $modalInstance, userForm) {
$scope.form = {}
thx for help and this amazing plugin
from angular-input-modified.
Related Issues (20)
- Add support for CommonJS HOT 5
- ngModel directive is not triggered HOT 6
- Compare Types HOT 3
- bs-modfiable seems to not behave as expected HOT 2
- add license to bower.json file HOT 1
- Add support for ngTagsInput HOT 3
- Angular 2 support? HOT 6
- TypeError: Cannot read property '$$notifyModelModifiedStateChanged' of null HOT 2
- It's not working for Text-Angular . HOT 1
- How to eanble this script on a specific form ? HOT 4
- "Ghost modified control" HOT 1
- Issues with input type=email HOT 1
- Bug with angular 1.6.1 HOT 5
- TypeError: Cannot read property '$$notifyModelModifiedStateChanged' of null
- Property `modified` on parentform not updated when childform was removed HOT 4
- $$onChildModelModifiedStateChanged HOT 3
- How do I know why the form is marked as modified? HOT 4
- Console Error HOT 5
- Modified state gets screwed when a subform is toggled HOT 1
- Modified state based on $viewValue instead of $modelValue ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-input-modified.