search

Home  >  Q&A  >  body text

angular.js - AngularJs table reuse

To achieve reuse of lists

1.html
<p>{{aa.aa}}</p>
<p>{{aa.bb}}</p>
<p> ;{{aa.cc}}</p>

2.html

<p ng-repeat="aa in aas">
<p ng-include="1.html"></p>
</p>

That’s it.

But I encountered a problem when reusing the table.
The situation is. The same Controller.

How to reuse an entire table when using a Controller?
That is to say, the data source of ng-repeat needs to be passed in from the upper layer.

Secondly.
will encounter grammatical errors and

<td ng-incloud="xxx.html"></td?


There will be grammatical errors. What to do at this time
phpcn_u1582phpcn_u15822811 days ago499

reply all(1)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-15 16:57:27

    <td ng-incloud="'xxx.html'"></td>

    reply
    0
  • Cancelreply