我正在尝试使用angularjs
指令渲染具有两列的表。
<table>
<tr ng-repeat="message in messages" >
<td ng-switch-on="message.network" ng-switch when="twitter" ng-controller="TweetController">
<span>
<input type="checkbox" name="active" ng-checked="{{message.isPublished}}" data-id="{{message.socialId}}" ng-click="publishMessage($event)" />
</span>
<span>
<img src="{{message.authorPicture}}" />
</span>
<span>{{message.createdAt}}</span>
<span>{{message.network}}</span>
<span>{{message.text}}</span>
</td>
<td ng-switch-on="message.network" ng-switch when="facebook" ng-controller="FacebookController">
<span>
<input type="checkbox" name="active" ng-checked="{{message.isPublished}}" data-id="{{message.socialId}}" data-createdAt="{{message.createdAt}}" ng-click="publishMessage($event)" />
</span>
<span>
<img src="{{message.authorPicture}}" />
</span>
<span>{{message.createdAt}}</span>
<span>{{message.network}}</span>
<span>{{message.text}}</span>
</td>
</tr>
</table>
应该有 2 列 - 第一个应该是 twitter 消息,第二个应该是 facebook 帖子。但在我的情况下,相同的消息在两列中呈现(就像这个http://puu.sh/5oHT7.png)。我做错了什么?