angular.js - Angular template reuse
黄舟
黄舟 2017-05-15 17:01:42
0
1
505
The function I want to implement is as shown in the picture above, with the list on the left and the properties panel in the upper right corner. There may be the same list items in the list. If they are the same list items, then their property panels are also the same. I'm using ng-include to load the templates for these property panels. Question: For example, the first three items are the same list items and correspond to the same template, which means they correspond to a controller. In this case, their data is shared, how to achieve separation? View shared, model separated
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
某草草

Similar to components in ReactJS, they are implemented using directives in Angularjs. Templates can be set inside the components. After defining the directives, they can be used anywhere, just like Component in ReactJS!

https://docs.angularjs.org/guide/directive

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template