Skip to content

Instantly share code, notes, and snippets.

@gmittica
Created October 18, 2017 10:57
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 gmittica/ed4b92d3a8d9c0d8e40dd9169979a179 to your computer and use it in GitHub Desktop.
Save gmittica/ed4b92d3a8d9c0d8e40dd9169979a179 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" ng-controller="myCtrl">
<div class="well">
<h1>Hello {{ name }}</h1>
</div>
</div>
<script id="jsbin-javascript">
angular.module("myApp",[])
.run(['$rootScope', function($rootScope) {
$rootScope.name = "BATMAN";
}])
.controller("mainCtrl", ['$scope', function($scope) {
$scope.name = "JOKER";
}])
.controller("myCtrl", ['$scope', function($scope) {
$scope.name = "CATWOMAN";
}])
</script>
<script id="jsbin-source-javascript" type="text/javascript">angular.module("myApp",[])
.run(['$rootScope', function($rootScope) {
$rootScope.name = "BATMAN";
}])
.controller("mainCtrl", ['$scope', function($scope) {
$scope.name = "JOKER";
}])
.controller("myCtrl", ['$scope', function($scope) {
$scope.name = "CATWOMAN";
}])</script></body>
</html>
angular.module("myApp",[])
.run(['$rootScope', function($rootScope) {
$rootScope.name = "BATMAN";
}])
.controller("mainCtrl", ['$scope', function($scope) {
$scope.name = "JOKER";
}])
.controller("myCtrl", ['$scope', function($scope) {
$scope.name = "CATWOMAN";
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment