2017-06-17 5 views
0

同じレコード構造を持つ2つのテーブルを作成したいと思います。 1つのテーブルがメインです。他のテーブルはArchivです。 レコードは、{{rec.Name}}、{{rec.Age}}などのcol-sm-x構造を持つブートストラップのdivです。 レコードの内容から、私はtablerecord.htmlテンプレートを作成しました。テーブルを構築するための2つの異なるng-repeat。私は、角度指令「recordTemplate」を使用するレコードテンプレートをロードするにng-repeatループ変数を角度で挿入する方法

<div> ng-repeat="rec in MainTable"><record_template/></div> 
and 
<div> ng-repeat="rec in Archiv""><record_template/></div> 

。 record_templateに "rec"変数を挿入するにはどうすればいいですか?

ありがとうございます。

答えて

0
As i don't know how you written your directive. you can check the below link. 

    http://jsbin.com/gopula/1/edit?html,js,output 

and try this 

<div> ng-repeat="rec in MainTable" record_template ="rec"/></div> 
and 
<div> ng-repeat="rec in Archiv" record_template="rec"/></div> 

    Hope this will help you 
+0

グレートおかげで@inputアノテーションを使用することができます!できます! – user2475466

関連する問題