Javascript 51
AngularJS ngClassEven NgClassOdd Example
AngularJS provides ngClass,ngClassEven and ngClassOdd directives for controlling applied class to an element. ngClassEven and ngClassOdd can be used in ngRepeat loop to style the alternate rows. In this demo, “We will create student table and apply these classes to alternate row for different color styling”. Below code uses for showing student data in […]
AngularJS uiGrid Module Example
Angular ui.grid module is external library for AngularJS to create table. You can read more detail form the following link https://github.com/angular-ui/ng-grid . In this demo, "We will create a table using Angular ui grid and YouTube Google developer video json data". $resource is used for create a AJAX request to download the Google developer channel as JSON data. The response […]
AngularJS ngSrcset directive Example
AngularJS provides ngSrcset attribute directive for handling multiple images based on condition. It is really helpful for handling responsive images.We can use this directive for showing different images based on screen width. In this demo,"We will use Gravatar images of different size for for different screen size". Below code shows the use of ngSrcset with […]
AngularJS ngBind ngBindTemplate ngBindHtml directive Example
AngularJS provides ngBind and ngBindTemplate for TEXT binding and ngBindHtml directive is used for HTML binding. ngBindHtml is present in ngSanitize module. In this demo, "We will see the example of ngBind, ngBindTemplate and ngBindHtml directive". Below code shows the use of ngBind, ngBindTemplate and ngBindHtml with scope variable. <!DOCTYPE html> <html ng-app="myApp"> <head> […]