AngularJS and HTML: Escaping quotes inside a variable for an onclick function

后端 未结 1 1216
日久生厌
日久生厌 2021-01-05 12:32

i\'m just wondering how to escape a function if it has quotes inside. for example, my variable is:

   {{ video.Id }} = \"Don\'t\";

then if

相关标签:
1条回答
  • 2021-01-05 12:53

    You don't need the inner {{}}, just do <button ng-click="executeFunc(video.Id)"/>

    Your controller function, executeFunc will get the proper value.

    0 讨论(0)
提交回复
热议问题