Note that there are some explanatory texts on larger screens.

plurals
  1. POAngularJs. Render table with ng repeat and ng switch
    primarykey
    data
    text
    <p>I'm trying render table with two columns using <code>angularjs</code> directives.</p> <pre><code>&lt;table&gt; &lt;tr ng-repeat="message in messages" &gt; &lt;td ng-switch-on="message.network" ng-switch when="twitter" ng-controller="TweetController"&gt; &lt;span&gt; &lt;input type="checkbox" name="active" ng-checked="{{message.isPublished}}" data-id="{{message.socialId}}" ng-click="publishMessage($event)" /&gt; &lt;/span&gt; &lt;span&gt; &lt;img src="{{message.authorPicture}}" /&gt; &lt;/span&gt; &lt;span&gt;{{message.createdAt}}&lt;/span&gt; &lt;span&gt;{{message.network}}&lt;/span&gt; &lt;span&gt;{{message.text}}&lt;/span&gt; &lt;/td&gt; &lt;td ng-switch-on="message.network" ng-switch when="facebook" ng-controller="FacebookController"&gt; &lt;span&gt; &lt;input type="checkbox" name="active" ng-checked="{{message.isPublished}}" data-id="{{message.socialId}}" data-createdAt="{{message.createdAt}}" ng-click="publishMessage($event)" /&gt; &lt;/span&gt; &lt;span&gt; &lt;img src="{{message.authorPicture}}" /&gt; &lt;/span&gt; &lt;span&gt;{{message.createdAt}}&lt;/span&gt; &lt;span&gt;{{message.network}}&lt;/span&gt; &lt;span&gt;{{message.text}}&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>There are should be 2 columns - in first should be twitter messages, in second should be facebook posts. But in my case the same message renders in both columns(Like this <a href="http://puu.sh/5oHT7.png" rel="nofollow">http://puu.sh/5oHT7.png</a>). What i'm doing wrong ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload