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> […]
AngularJS $interpolateProvider Example
AngularJS provide $interpolateProvider for configuring the start and end symbol of expression. AngularJS expression takes double curly braces {{expression}} by default. Using startSymbol() and endSymbol() method we can change these default value to a different tag. In this demo,"We will use $interpolateProvider to change the start and end tag of AngularJS expression". Below code has […]
AngularJS ngList Built-In Directive Example
AngularJS provides ngList built-in directive for separating input string. It can be used with ngTrim for handling white space in trailing. In this demo "We will see how to use ngList directive in input type text". Below code has the fruit array which is separated using default separator and with new separator hyphen -. <!DOCTYPE […]