Error in event handler for 'undefined': undefined

416 views
Skip to first unread message

Johan Steenkamp

unread,
Dec 8, 2011, 1:47:36 AM12/8/11
to ang...@googlegroups.com
I have prev/next buttons that decrement/increment selectedYear value.

<ul>
<li><a href="#/tasks/{{selectedYear - 1}}" class="btn small">&lt;</a></li>
<li><a href="#/tasks/{{selectedYear + 1}}" class="btn small">&gt;</a></li>
</ul>

Works fine, however if I click either button multiple times very quickly Chrome displays in console "Error in event handler for 'undefined':
undefined" but no other clues as to where to look.

App continues to work so not a fatal issue - wondering how I can prevent this.

Vojta Jina

unread,
Dec 9, 2011, 5:21:44 PM12/9/11
to ang...@googlegroups.com
Use ng:href instead href (when there is binding inside)... it might happen that you click faster than angular compiles...

V.

Igor Minar

unread,
Dec 10, 2011, 4:36:26 AM12/10/11
to ang...@googlegroups.com
you might also want to start the debugger and turn on the "break on exception" feature. that might give you more clues about where this error is coming from.

On Fri, Dec 9, 2011 at 2:21 PM, Vojta Jina <vojta...@gmail.com> wrote:
Use ng:href instead href (when there is binding inside)... it might happen that you click faster than angular compiles...

V.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/xvUaAug0ApsJ.

To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Johan Steenkamp

unread,
Dec 11, 2011, 1:41:55 PM12/11/11
to ang...@googlegroups.com
Thanks Vojta, Igor

ng:href - does not solve the problem.

Using break on exception appears event is being seen as dblclick. I'll investigate some more and post update.

Thanks for suggestions 


Johan Steenkamp

unread,
Dec 11, 2011, 10:52:07 PM12/11/11
to ang...@googlegroups.com
Turns out it was nothing with angular - Google Dictionary chrome extension was the culprit. 


Sorry I should have confirmed issue in another browser as well before posting.

Thanks
Reply all
Reply to author
Forward
0 new messages