Skip to content

Instantly share code, notes, and snippets.

@asadsahi
Created December 21, 2014 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asadsahi/fe99e0dba32592d70fed to your computer and use it in GitHub Desktop.
Save asadsahi/fe99e0dba32592d70fed to your computer and use it in GitHub Desktop.
ng Demo // source http://jsbin.com/coqohe
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<meta charset="utf-8">
<title>ng Demo</title>
</head>
<body data-ng-app='app'>
<div data-ng-controller="myCtrl">
<div data-my-dir></div>
</div>
<script id="jsbin-javascript">
(function(){
angular.module('app', [])
.controller('myCtrl', function(){
})
.directive('myDir', function(){
return {
restrict: 'AE',
template: '<input type="text" >',
link: function(scope, elem, attr){
}
};
});
}());
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"><\/script>
<meta charset="utf-8">
<title>ng Demo</title>
</head>
<body data-ng-app='app'>
<div data-ng-controller="myCtrl">
<div data-my-dir></div>
</div>
</body>
</html></script>
<script id="jsbin-source-javascript" type="text/javascript">(function(){
angular.module('app', [])
.controller('myCtrl', function(){
})
.directive('myDir', function(){
return {
restrict: 'AE',
template: '<input type="text" >',
link: function(scope, elem, attr){
}
};
});
}());</script></body>
</html>
(function(){
angular.module('app', [])
.controller('myCtrl', function(){
})
.directive('myDir', function(){
return {
restrict: 'AE',
template: '<input type="text" >',
link: function(scope, elem, attr){
}
};
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment