Monday, October 19, 2015

Angular two way binding

                       

Two way data binding:  When the view changes model changes and when the model changes view                                        changes
Note: In angular we do not need observable as we need in Knockout

Thursday, October 15, 2015

Angular Pagination Directive

To implement paging in a table we need drpagination directive. 
It is available at drPagination

Tuesday, October 13, 2015

Excel export from JSON

                               

I have a previous posts on generating Excel file from a table. Unfortunately they do not work in IE. We can generate Excel file from a JSON file as shown below

What do we need?

  • JSONtoCSVConverter javascript file.
  • JSON Data
  • Jquery 
This line is important
 JSONToCSVConvertor(data, "Blog Report", true);

Wednesday, October 7, 2015

Java script cheat sheet

                                        Java script cheat sheet

Replace a character

$scope.SelectedUsers.selected.Text.replace("– ", "-- ")

Monday, October 5, 2015

Why Protractor?

                           
Use : End to End testing

Advantages
  • Test like a user
  • Improve test efficiency
  • Pain point in testing is it is repetitive. It takes care of it
  • It always remembers to check everything
  • Protractor runs while we are working
  • It would interact with the browser faster then humans
  • It would enter data faster then humans
Note: It is built on selenium

For more information :
https://docs.angularjs.org/guide/e2e-testing

Sunday, October 4, 2015

Angular - Export to table (XML, PDF, JSON..)

       
we can export data from a table into various format including 
Json, Xml, Pdf .....

What do you need
  • Angularjs
  • Jquery.js
  • Files referenced below

Note: This example would not run in IE 


Angular export to Excel


Note: You can refer to my other post where it would support different flavors like Excel, Pdf
Edit in plunker new

Note: For excel it does not allow "-" character. We have to use replace function


$scope.SelectedUsers.selected.Text.replace("– ", "-- ")