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 / index.html
Created December 27, 2014 11:39
Ng If and show and hide // source http://jsbin.com/lifuju
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng If and show and hide</title>
</head>
<body>
<div ng-if = "2 + 2 == 4">
Hi, I do exist.
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https:ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
<title>Ng Switch</title>
</head>
<body>
<div ng-switch on="person.name">
<input type="text" ng-model = "person.name" />
@ganesanarun
ganesanarun / index.html
Created December 23, 2014 11:56
Directives with Child Scope // source http://jsbin.com/bujure
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Directives with Child Scope</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
</head>
<body>
<h1> Copy by Value Block </h1>
@ganesanarun
ganesanarun / index.html
Created December 23, 2014 11:25
Delay Binding Example // source http://jsbin.com/yisimu
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Delay Binding Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
</head>
<body>
<h1> HREF DEMO </h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"> </script>
</head>
<body ng-app ="myApp">
<div ng-controller ="disableController">
<h2> Disable Implementation</h2>
@ganesanarun
ganesanarun / index.html
Created December 19, 2014 11:03
Directive with paramers // source http://jsbin.com/kureti
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Directive with paramers</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
</head>
<body>
<input type="text" ng-model="myUrl" val="google"> </input>
<div my-directive some-attr = "{{ myUrl }}" my-link-text="google"></div>
<script>
@ganesanarun
ganesanarun / index.html
Created December 19, 2014 11:02
Two way binding of Directives // source http://jsbin.com/kureti
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Two way binding of Directives</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
</head>
<body>
<input type="text" ng-model="outerScopeUrl" > </input>
<div my-directive some-attr = "outerScopeUrl" my-link-text="google"></div>
@ganesanarun
ganesanarun / index.html
Created December 18, 2014 12:34
Current Scope Introduction // source http://jsbin.com/qujise
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Current Scope Introduction </title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.js"></script>
<style>
#parentCtrl {
background-color: yellow;
padding: 10px;
@ganesanarun
ganesanarun / index.html
Created December 18, 2014 12:19
Simple Expressions with Directive // source http://jsbin.com/qiyeze
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Simple Expressions with Directive</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.js"></script>
</head>
<body ng-app="myApp">
<input ng-model ="g" type="text" ></input>
@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>