I have a doubt when using the command. If I have a select plug-in, I currently write it in the command and get the option data of the controller through the scope. But when the select triggers the event, different methods will be executed. . If this instruction is used in different places, do I need to write multiple instructions to distinguish different methods? Or write an instruction and then execute a different method somewhere? Are there any cases? Thanks
See below: angular-smart-chartist directive plug-in. In the example given, multiple references to the directive appear on the same page, instead of writing multiple different directives.
In fact, the directive uses 'scope' to obtain a separate scope for it, making it possible to reuse it