Skip to content

Instantly share code, notes, and snippets.

@netsi1964
Created July 5, 2012 17:40
Show Gist options
  • Save netsi1964/3055117 to your computer and use it in GitHub Desktop.
Save netsi1964/3055117 to your computer and use it in GitHub Desktop.
angular - webapp
<!doctype html>
<html ng-app>
<title>angular - webapp</title>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script type="text/javascript">
function AlbumCtrl($scope, $location, $routeParams) {
$scope.images = [
{"image":"http://pcdn.500px.net/2558330/2e1627d8a2b99d422267fd95a9e32b47c92c8668/3.jpg", "description":"Gotcha!"},
{"image":"http://pcdn.500px.net/3838067/361b4bf0095cb4132e74ca88c855171eb51d26dd/3.jpg", "description":"What, no butter OR salt"},
{"image":"http://pcdn.500px.net/2755008/fc1deeb03a5c34b3aca12649e54a19e2df8d19f3/3.jpg", "description":"Lil Rebel"},
{"image":"http://pcdn.500px.net/8788429/dc55877cd7cd2116c3c29d55d74c0d681167c91c/3.jpg", "description":"Summer Dusk"}
];
}
</script>
<!-- <link rel="Stylesheet" type="text/css" href="http://dl.dropbox.com/u/3260327/shared.css" /> -->
<link rel="Stylesheet" type="text/css" href="http://bootswatch.com/cyborg/bootstrap.min.css" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32331522-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<style>
.arrow-left {
width: 1em;
display: inline-block;
margin: 0px .5em -0.2em 0px;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right:10px solid blue;
}
#topmenu {
position: fixed;
z-index: 10;
padding: 0.3em;
width: 100%;
left: 0px;
top: 0px;
background: wheat;
box-shadow: 0px 0px 7px rgba(0,0,0,.5);
}
#topmenu a {
line-height: 22px;
padding: .5em;
color: black;
text-decoration: none;
}
body {
padding-top: 5em;
}
</style>
<div id="topmenu"><a class="Other" href="index.html"><span class="arrow-left"></span>Other AngularJS demos</a></div>
</head>
<body>
<div ng-controller="AlbumCtrl">
<ul>
<li ng-repeat="image in images">
<img ng-src="{{image.image}}" alt="{{image.description}}"></li>
</ul>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment