Operations on the dom structure are generally performed in instructions, so in the template of the construction instruction, which is the HTML string you construct, directly add functions such as '<form>..<icon ng-click="hideform">...</form>' 这样一旦指令生成表单后我们能够在当前指令的link函数中设置一个scope.hideform=function(){} functions to control the hiding and display of the form. Scope and attr are needed here. You can get it in the link parameter
Operations on the dom structure are generally performed in instructions, so in the template of the construction instruction, which is the HTML string you construct, directly add functions such as
'<form>..<icon ng-click="hideform">...</form>'
这样一旦指令生成表单后我们能够在当前指令的link函数中设置一个scope.hideform=function(){}
functions to control the hiding and display of the form. Scope and attr are needed here. You can get it in the link parameter