Closed liekkas closed 8 years ago
The on-change & on-show attributes are binded with '=' as opposed to '&' so supplying a function expression is not correct.
You will need to modify your code like so:
on-change="test.onChange" on-show="test.onShow"
(notice I removed the ()
)
The reason this is done is because Angular can only pass certain types of variables to functions, and Semantic UI has callbacks which return "invalid" types in their callbacks. This will be changed in the future to operate as you expected.
For more information:
http://clickermonkey.github.io/SemanticUI-Angular/src/dropdown/directives.html
it works,thank u.
in view:
in ctrl:
open the html,first time,the console prints log 3 times :
if I chose one,the console prints log 2 times:
it seems the event were trigged twice,how to fix it? thank u very much.