Skip to content

Instantly share code, notes, and snippets.

@egel
Forked from pmanijak/include.html
Created Mar 4, 2016
Embed
What would you like to do?
Minimal template example with AngularJS
<!doctype html>
<html ng-app="project">
<head>
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script src="project.js"></script>
</head>
<body>
<div ng-view></div>
</body>
angular.module('project',[]).
config(function($routeProvider) {
$routeProvider.
when('/', {controller:MyCtrl, templateUrl:'include.html'});
});
function MyCtrl($scope) {
// No model ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment