From cca99e23b7b81bca4f6e11dc61f89ea1bbc2c4d8 Mon Sep 17 00:00:00 2001 From: Erik Forkalsrud Date: Fri, 29 Aug 2014 13:12:53 -0700 Subject: [PATCH] playing with angularjs --- src/main/webapp/album.js | 13 +++++++++++++ src/main/webapp/ang.html | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/main/webapp/album.js create mode 100644 src/main/webapp/ang.html diff --git a/src/main/webapp/album.js b/src/main/webapp/album.js new file mode 100644 index 0000000..e7896f1 --- /dev/null +++ b/src/main/webapp/album.js @@ -0,0 +1,13 @@ + +var album = angular.module("album", [ ]); + +album.controller("AlbumController", ["$http", "$log", function($http, $log) { + var alb = this; + this.items = [ ]; + this.update = function() { + $log.info("updating..."); + $http.get("/photo/album/Downloads.json").success(function(data) { + alb.items = data.contents; + }); + } +}]); diff --git a/src/main/webapp/ang.html b/src/main/webapp/ang.html new file mode 100644 index 0000000..338f614 --- /dev/null +++ b/src/main/webapp/ang.html @@ -0,0 +1,14 @@ + + + + + + + +

Album

+
+
+ +
+ + \ No newline at end of file