03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

E-Commerce 259<br />

33 <br />

34 Price: @{{ product.price }}, Stock: @{{ product.stock }}<br />

35 <br />

36 <br />

37 <br />

38 <br />

39 <br />

.<br />

This was extracted from app/views/index.blade.php.<br />

If you’re wondering how the interface is updated when the data is fetched asynchronously, but the<br />

good news is you don’t need to. AngularJS takes care of all interface updates; so you can focus on<br />

the actual application! Open up a browser and see it working…<br />

Now that we have dynamic categories and products, we should implement a filter so that products<br />

are swapped out whenever a user selects a category of products.<br />

1 <br />

7 All<br />

8 <br />

9 <br />

16 @{{ category.name }}<br />

17 <br />

18 <br />

19 <br />

20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!