Confusing error message on ngChange without ngModel

2,978 views
Skip to first unread message

Phil Mitchell

unread,
Apr 12, 2013, 2:24:38 PM4/12/13
to ang...@googlegroups.com
When you try to use ngChange without ngModel (which I believe is a reasonable use case), the error message is rather confusing:

Error: No controller: ngModel

In this case, a better message would be:

Error: ngChange cannot be used without ngModel

Don't know if this can be easily changed, but in any case I thought this might help another newbie such as myself! Angular is fantastic!

Justin Russell

unread,
Apr 12, 2013, 6:17:09 PM4/12/13
to ang...@googlegroups.com

Just fyi the docs for ngChange do indicate that ngModel is required. But yeah, the message could be clearer.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Daniel Macias

unread,
Aug 8, 2013, 5:01:51 PM8/8/13
to ang...@googlegroups.com
The docs specify it's required now:


Out of curiosity, why IS it required to have ng-model?  We're building an app that has little 2-way binding.  I have to bind to some arbitrary value just to get it to work...

Maximiliano Rico

unread,
Oct 16, 2013, 11:47:39 PM10/16/13
to ang...@googlegroups.com
I'd like to use ng-change without ng-model too. 

Maxi
Reply all
Reply to author
Forward
0 new messages