想实现这样一个功能:
点击页面的编辑按钮 ,页面的数据变成可编辑状态,编辑之后点击确定,编辑的数据展示在页面上
If I use Angular to implement it, my current idea is to click the edit button and replace the displayed data part with an editable template through directive. After editing, click OK and then switch the template. I don’t know if this is possible
This is how to switch between two templates. Is it possible to achieve it without routing?
Let me give you a simple example:
plunker
In fact, this is just to change the value of the flag variable when the button is clicked, and then display different areas according to the variable value