Question: Client will fetch json formatted data from server:

```
{"html": "<hr>a<br>"}

```

And I want to render the html code into a div. How can I do that?

And in fact, I want to display the rendered html page inside a wysiwyg editor.

Is there any Opensource wysiwyg(js, html5, or sth) can do this?

Answer: 
The problem is not in the ng-repeat. It is correct based on your data structure. I would change the approach to the way you're adding data to your cart. Presently, you're pushing all of the "item" sizes to the cart regardless if the user selects that particular size of item or not and you're just using ng-class to hide the sizes that have a quantity of 0. That doesn't make a lot of sense to me.

That said, you can use filter in your view to filter out the items with a quantity of 0. The difference between what you're doing now which is just using CSS to hide those values, and using the filter is that the filter won't actually generate any DOM elements for any of the values that don't match the filter.

So you could do something like this in your controller:

```
$scope.greaterThan = function(prop, val){
    return function(item){
      return item[prop] > val;
    }
}

```

Then in your repeat:

```
ng-repeat="size in item.sizes | filter: greaterThan('numOrders', 0) track by $index"

```

Alternatively, you can use ngIf, which will also not render the DOM elements such as:

```
<input ng-repeat="size in item.sizes track by $index" ng-if="size.numOrders <= 0" type="hidden" name="amount_{{$index}}" value="{{size.price}}">

```

Still, I highly recommend that you take a look at how you might optimize your cart functionality. There is a very good book called [Pro AngularJS](https://rads.stackoverflow.com/amzn/click/com/B00HX4PJ9I). I seem to recall that the main example used the book goes step by step through creating an online shop. You might want to get it just for the example code. It would definitely help you streamline what you've got, set up a service for the cart and use custom directives for example for the cart dropdown.
Your HTML

```
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" 
           alt="Make payments with PayPal - it's fast, free and secure!">

```

Replace it with :

```
<input type="submit" style="background:url(http://www.paypal.com/en_US/i/btn/x-click-but01.gif); width:100px; height:100px;" name="Submit" 
           alt="Make payments with PayPal - it's fast, free and secure!">

```