Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created May 26, 2015 14:20
Show Gist options
  • Save johnlindquist/80919cd445f55efc39ba to your computer and use it in GitHub Desktop.
Save johnlindquist/80919cd445f55efc39ba to your computer and use it in GitHub Desktop.
function ClassRoom(){}
ClassRoom.annotations = [
new angular.ComponentAnnotation({
selector: "class-room"
}),
new angular.ViewAnnotation({
template: "<h1>Windows, Chairs, Tables</h1>"
})
];
function Workshop(){}
Workshop.annotations = [
new angular.ComponentAnnotation({
selector: "workshop"
}),
new angular.ViewAnnotation({
directives: [ClassRoom],
template: "<div><class-room></class-room></div>"
})
];
document.addEventListener("DOMContentLoaded", function(){
angular.bootstrap(Workshop);
});
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>AngularJS Jumpstart</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<script src="angular2.sfx.dev.js"></script>
<script src="app.js"></script>
</head>
<body>
<workshop></workshop>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment