Created
November 23, 2012 22:59
-
-
Save SergeiGolos/4137647 to your computer and use it in GitHub Desktop.
[AngularStudent] Routing? Part1 (index.html)
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
<html ng-app="ngViewTest"> | |
<head> | |
<title> | |
Routing? Part 1 (example 1) | |
</title> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> | |
<script src="controller.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div ng-controller="MainCntl"> | |
<div class="navbar navbar-fixed-top"> | |
<div class="navbar-inner"> | |
<div class="container"> | |
<a class="brand" | |
href="#/" | |
style="padding-top: 6px; padding-bottom: 0px;">Home</a> | |
<ul class="nav"> | |
<li ng-repeat="link in links"> | |
<a href="#/{{link}}">{{link}}</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
<div style="margin-top:45px;"> | |
<div ng-view/> | |
</div> | |
</div> | |
</body> | |
<!-- Preloaded tempaltes for use with routing --> | |
<script id="about.html" | |
type="text/ng-template" > | |
About page, display template with no special values; | |
</script> | |
<script id="detailTemplate.html" | |
type="text/ng-template"> | |
Detail page, display template for detailId = {{test}} | |
</script> | |
<script id="home.html" | |
type="text/ng-template"> | |
Default view when entring the page. | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment