JSFiddle - React, Tailwind, and code Playground
HTML
<body ng-app="app">
<h3>1) Uncomment the relationships in the Javascript to watch this break</h3>
<h3>2) Don't forget to hit Run to re-evaluated the scripts on the page</h3>
<h3>3) View the errors in the console</h3>
<div ng-controller="MainCtrl">
Filter Posts: <input ng-model="search">
<div ng-repeat="post in posts | filter:search" class="post">
{{post.title}}
</div>
</div>
</body>
CSS
.post { border: 1px solid black; width=100%; padding: 10px; margin: 10px 0px; }
JavaScript
angular
.module('app', [])
.controller('MainCtrl', function($scope) {
var post = {title: 'Great Post'};
var post2 = {title: 'Good Post'};
var comment = {body: 'Great comment'};
var comment2 = {body: 'Good comment'};
//post.comments = [comment];
//post2.comments = [comment2];
comment.post = post;
comment2.post = post2;
$scope.posts = [post, post2];
});