AngularJS: How to pass arguments/functions to a directive?

后端 未结 3 1590
不知归路
不知归路 2020-12-08 06:29

Look at this Fiddle, what do I have to change, that the expressions in the template get evaluated using the arguments I defined in the HTML? The SAVE-button should call the

3条回答
  •  暖寄归人
    2020-12-08 06:56

    Just a quick note that you dont need the wrapping function save. Just call this in the template:

    '

    ',

    That transposes the function call and passes the parameters as expected.

    This simplifies code and makes it a lot easier to read.

提交回复
热议问题