Created
October 10, 2017 10:08
-
-
Save gmittica/43e65767b2436212ce183e6fc3444e1c to your computer and use it in GitHub Desktop.
Lesson // source http://jsbin.com/vazedi
This file contains 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> | |
<script src="https://rawgit.com/angular/bower-angular/master/angular.min.js"></script> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Lesson</title> | |
</head> | |
<body ng-app="myApp" ng-controller="myCtrl"> | |
<div class="container"> | |
<h1>Directives</h1> | |
<div my-directive></div> | |
<my-directive></my-directive> | |
</div> | |
<script id="jsbin-javascript"> | |
angular.module("myApp", []) | |
.controller("myCtrl", ['$scope', function($scope) { | |
// ctrl code here | |
}]) | |
.directive("myDirective", [function() { | |
return { | |
restrict: 'AE', | |
replace: true, | |
template: '<h2>hello world</h2>', | |
scope: {}, | |
link: function() { | |
} | |
}; | |
}]); | |
; | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">angular.module("myApp", []) | |
.controller("myCtrl", ['$scope', function($scope) { | |
// ctrl code here | |
}]) | |
.directive("myDirective", [function() { | |
return { | |
restrict: 'AE', | |
replace: true, | |
template: '<h2>hello world</h2>', | |
scope: {}, | |
link: function() { | |
} | |
}; | |
}]); | |
;</script></body> | |
</html> |
This file contains 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
angular.module("myApp", []) | |
.controller("myCtrl", ['$scope', function($scope) { | |
// ctrl code here | |
}]) | |
.directive("myDirective", [function() { | |
return { | |
restrict: 'AE', | |
replace: true, | |
template: '<h2>hello world</h2>', | |
scope: {}, | |
link: function() { | |
} | |
}; | |
}]); | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment