Uncategorized

Day#8 Connecting our application to REST API using ngResource

Removing client side searching and sorting :-

Until the previous blog, if I start the localserver, items in the table are showing according to the selected order. But the order is only showing up for only first 20 items and we need to sort for all the items.  Instead of client side sorting we will make the server side searching and sorting.  In index.html, we will modify the tr tag which is filtering items and remove them by replacing with server side searching and sorting.

code:- https://github.com/praneethkumarpidugu/angular1-core/commit/bd4585a3a7ccaea9c104ee2245574d500abb1d9d

watch scope variables for changes :-

watch is way of notifying whenever variables change on scope. First of all we will remove sensitive search from main.js.  For testing around basic watch variables we define with $watch scope variable with search string and second parameter a function with newVal and oldVal as function parameters. Currently we will simple log the newVal as we type in the search field.

code:- https://github.com/praneethkumarpidugu/angular1-core/commit/05c49a4c480a34bb8be9f5c2f2ad4fc63c4403a1

Screen Shot 2016-07-04 at 11.16.03 pm

 

Leave a comment