This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Using Controller</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app ="myApp"> | |
| <input type="text" ng-model="name"></input> | |
| <!-- <h1> Hello {{name}} </h1> If I uncomment this line, need to uncomment the line $scope.name (strange) isn't it? --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Controllers Insight part I</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app = "myApp"> | |
| <h1 style='color:green'> Demo 1 - we can define the methods and properties in the controller scope </h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app = "myApp"> | |
| <div ng-controller = 'myController'> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Interpolation</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"> | |
| </script> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Inerpolate</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script> | |
| </head> | |
| <body> | |
| <div ng-app="myApp"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Filters</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script> | |
| </head> | |
| <body ng-app="MyApp"> | |
| <div ng-controller="myController"> | |
| <h1> {{ today | date : 'y MM dd HH: mm: ss.sss a Z' }} </h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="myApp"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Form Validation Shows Validation when form submitted only</title> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css"> | |
| <style> | |
| input.ng-invalid { | |
| border: 1px solid red; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="myApp"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Form Validation Shows Validation when blurred</title> | |
| <link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css"> | |
| <style> | |
| input.ng-invalid { | |
| border: 1px solid red; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>My First Directive</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script> | |
| </head> | |
| <body ng-app="myApp"> | |
| <my-directive></my-directive> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>My Replacable Directive</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script> | |
| </head> | |
| <body ng-app="myApp"> | |
| <my-directive></my-directive> | |
OlderNewer