Last active
January 1, 2018 22:59
-
-
Save kaidokert/eeb3f05ee7d812f50be1367b0e43e430 to your computer and use it in GitHub Desktop.
Minimal standalone bootstrap/angular page
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 lang="en" xmlns="http://www.w3.org/1999/html"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Title</title> | |
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body class="" style="" xmlns:ng="http://angularjs.org" ng-app="fooApp" ng-strict-di> | |
<div id="main-container" class="container" ng-controller="fooController"> | |
<div class="row"> | |
<div id="row-container" class="col-sm-9"> | |
<button ng-click="toggle = !toggle">Toggle {{toggle}}</button> | |
</div> | |
</div> | |
</div> | |
<script type="text/javascript" src="https://cdn.jsdelivr.net/bootstrap.native/1.0.6/bootstrap-native.min.js"></script> | |
<script type="text/javascript" src="https://code.angularjs.org/1.6.8/angular.min.js"></script> | |
<script> | |
var app = angular.module('fooApp', []) | |
.controller('fooController', FooController); | |
FooController.$inject = ['$scope', '$http']; | |
function FooController($scope, $http) { | |
var counter = 0; | |
$scope.$watch('toggle', function (toggle) { | |
console.log('Toggling ' + counter++); | |
}); | |
}; | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment