Skip to content

Instantly share code, notes, and snippets.

View ganesanarun's full-sized avatar
🎲

Ganesan Arunachalam ganesanarun

🎲
  • Thoughtworks
  • Bangalore
View GitHub Profile
@ganesanarun
ganesanarun / Basic.html
Last active August 29, 2015 14:11
Using Controller// source http://jsbin.com/qiraqagipe
<!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? -->
@ganesanarun
ganesanarun / index.html
Created December 9, 2014 02:33
Controllers Insight part I // source http://jsbin.com/rafesi
<!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>
<!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'>
@ganesanarun
ganesanarun / index.html
Created December 10, 2014 09:17
Interpolation // source http://jsbin.com/tarepo
<!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>
@ganesanarun
ganesanarun / index.html
Created December 10, 2014 10:59
Inerpolate // source http://jsbin.com/runir
<!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">
<!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>
@ganesanarun
ganesanarun / index.html
Created December 16, 2014 07:42
Form Validation Shows Validation when form submitted only // source http://jsbin.com/tiwemi
<!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;
}
@ganesanarun
ganesanarun / index.html
Created December 16, 2014 08:16
Form Validation Shows Validation when blurred // source http://jsbin.com/tiwemi
<!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;
}
@ganesanarun
ganesanarun / index.html
Created December 18, 2014 11:33
My First Directive // source http://jsbin.com/museqi
<!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>
@ganesanarun
ganesanarun / index.html
Created December 18, 2014 11:36
My Replacable Directive // source http://jsbin.com/museqi
<!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>