Category: Angular JS

AngularJS ng-class directive with example

AngularJs ng-class directive is dynamical binds one or more CSS classes to an HTML element. which we can change according to the condition. In this tutorial, I am going to show you AngularJS ng-class directive. AngularJS ng-class-even directive. AngularJs ng-class-odd directive. AngularJS ng-class directive index.html <!DOCTYPE html> <html> <script src=""></script> <style> .red { background-color:red; } .blue {

AngularJS ng-include | ng-if | ng-switch with example

AngularJS ng-include AngularJS ng-include is used to include other pages inside your code. we will see how to use the ng-include directory with the example. index.html <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> <script src=""></script> <script src=js/index.js></script> </head> <body ng-app> <div ng-include="'home.html'"> </div> </body> </html> home.html <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title

AngularJs events with examples

AngularJs Events AngularJs events are used to handle the dom events. Like mouse events,  key events. following events are providing by angular js which makes our task easy.     ng-show     ng-click     ng-blur     ng-change     ng-copy     ng-paste     ng-cut     ng-dblclick     ng-focus     ng-keydown     ng-keypress     ng-keyup     ng-mousedown     ng-mouseenter

AngularJs object,Arrays and $eval with example

AngularJs object providing a better way to hold data in object form. We can simply define an object with angularJs object. In this tutorial, I am going to show you AngularJs object AngularJS Array AngularJS $eval AngularJs object  how to define AngularJs object. obj ={s1 :’AngularJS ‘,s2 : ‘With CodeBun’} Complete code for AngularJs object <html> <head> <meta

AngularJs expression with number and string

Angular JS expression and ng-bind directive AngularJs Expression uses to bind data with HTML. We can write angualarJS expression inside braces {{ }} or we can use ng-bind directive. In this tutorial, I am going to show you : Angular JS simple expression Angular JS ng-init directive Angular JS ng-bind directive Angular JS expression with number Angular