The plot thickens....

In effort to track down 'on' attribute not working I modified angular's 
ngSwitch directive, changing attr.on to attr.ona as well as adding console 
log displaying trigger of $watch, and html code to

<ng-switch ona="testme">
 <div ng-switch-when="1">one one</div>
 <div ng-switch-default>one none</div>
</ng-switch>

This displayed same output as using "on" attribute 

watch expression undefined
watch expression triggered undefined

I then changed (in angular.js) attr.on to attr.onabc thinking this pretty 
unlikely to be used elsewhere and updated html code to:

<ng-switch onabc="testme">
 <div ng-switch-when="1">one one</div>
 <div ng-switch-default>one none</div>
</ng-switch>

Still shows the undefined messages.

Then edited angular's directive attr.on to attr.aonabc and made 
corresponding change in html code and the switch works and debug output as 
expected.

watch expression testme
watch expression triggered 1


Then for giggles I changed attr.on to attr.onabc123zxc and I saw the 
undefined messages again.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to