Skip to content

Instantly share code, notes, and snippets.

@gmittica
Created October 18, 2017 11:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gmittica/0431f9098d5dd8ec6d0be59f445fde1b to your computer and use it in GitHub Desktop.
Lesson // source https://jsbin.com/piweyat
<!DOCTYPE html>
<html ng-app="myApp" ng-controller="mainCtrl">
<head>
<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>
<script src="https://rawgit.com/angular/bower-angular/master/angular.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Lesson</title>
</head>
<body >
<div class="container">
<div class="well" ng-controller="myCtrl">
<h1>Number {{ number }}</h1>
</div>
<div
ng-include
src="'/tpl.html'"
ng-controller="myCtrl"
></div>
</div>
<script type="text/ng-template" id="/tpl.html">
<h1>Another tpl: {{ number }}</h1>
</script>
<script id="jsbin-javascript">
angular.module("myApp",[])
.controller("mainCtrl", ['$scope', function($scope) { }])
.controller("myCtrl", ['$scope', function($scope) {
$scope.number = 10;
}])
</script>
<script id="jsbin-source-javascript" type="text/javascript">angular.module("myApp",[])
.controller("mainCtrl", ['$scope', function($scope) { }])
.controller("myCtrl", ['$scope', function($scope) {
$scope.number = 10;
}])</script></body>
</html>
angular.module("myApp",[])
.controller("mainCtrl", ['$scope', function($scope) { }])
.controller("myCtrl", ['$scope', function($scope) {
$scope.number = 10;
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment