From c7770c76c3dc0fb78bd7c3e8690aa9ebf108812e Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 09:09:44 -0700 Subject: [PATCH 1/7] Continue playing with controllers and service --- build/html/blogpost.html | 133 ++++++++++++++++++++------------------- build/html/form.html | 12 ++-- build/index.html | 2 +- src/html/blogpost.html | 133 ++++++++++++++++++++------------------- src/html/form.html | 12 ++-- src/index.html | 2 +- src/js/entry.js | 6 ++ src/js/gist-date-ctrl.js | 11 ++++ src/js/gist-form-ctrl.js | 39 ++++++++++++ src/js/gist-service.js | 37 +++++++++++ src/js/gistlist-ctrl.js | 31 +++++++++ src/js/gists-app.js | 16 +++-- 12 files changed, 281 insertions(+), 153 deletions(-) create mode 100644 src/js/gist-date-ctrl.js create mode 100644 src/js/gist-form-ctrl.js create mode 100644 src/js/gist-service.js create mode 100644 src/js/gistlist-ctrl.js diff --git a/build/html/blogpost.html b/build/html/blogpost.html index 08c457a..fa0b941 100644 --- a/build/html/blogpost.html +++ b/build/html/blogpost.html @@ -1,78 +1,79 @@ - -
-

Blog

-

The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that

-
- - - diff --git a/build/html/form.html b/build/html/form.html index 5473f66..e0b9f0e 100644 --- a/build/html/form.html +++ b/build/html/form.html @@ -22,10 +22,12 @@

Add or Edit A Blogpost

-
- - - - + + Gist Description + {{vm.gist.description}} + + Public + Gist Username + Date
diff --git a/build/index.html b/build/index.html index 0703181..9087783 100644 --- a/build/index.html +++ b/build/index.html @@ -36,7 +36,7 @@

intelly

-
+
diff --git a/src/html/blogpost.html b/src/html/blogpost.html index 08c457a..fa0b941 100644 --- a/src/html/blogpost.html +++ b/src/html/blogpost.html @@ -1,78 +1,79 @@ - -
-

Blog

-

The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that

-
- - -
+ diff --git a/src/html/form.html b/src/html/form.html index 5473f66..e0b9f0e 100644 --- a/src/html/form.html +++ b/src/html/form.html @@ -22,10 +22,12 @@

Add or Edit A Blogpost

-
- - - - + + Gist Description + {{vm.gist.description}} + + Public + Gist Username + Date
diff --git a/src/index.html b/src/index.html index 0703181..9087783 100644 --- a/src/index.html +++ b/src/index.html @@ -36,7 +36,7 @@

intelly

-
+
diff --git a/src/js/entry.js b/src/js/entry.js index 0baed5d..34a2c51 100644 --- a/src/js/entry.js +++ b/src/js/entry.js @@ -1,3 +1,9 @@ require("./gists-app.js"); require("./gists-ctrl.js"); require("./gists-filters.js"); + +// require("./gist-form-ctrl.js"); +// require("./gistlist-ctrl.js"); +// require("./gist-service.js"); + +// require("./gist-date-ctrl.js"); diff --git a/src/js/gist-date-ctrl.js b/src/js/gist-date-ctrl.js new file mode 100644 index 0000000..55e6d53 --- /dev/null +++ b/src/js/gist-date-ctrl.js @@ -0,0 +1,11 @@ +require('./gists-app.js'); + +// Controller to make DATE work! +(function() { + + angular.module("gisty").controller("DateCtrl", ["$scope", function($scope) { + $scope.date = new Date(); + }]); + + +})(); diff --git a/src/js/gist-form-ctrl.js b/src/js/gist-form-ctrl.js new file mode 100644 index 0000000..a2bf23c --- /dev/null +++ b/src/js/gist-form-ctrl.js @@ -0,0 +1,39 @@ +require("./gists-app.js"); + +(function() { +'use strict'; + + angular.module("gisty").controller("GistFormCtrl", ["GistService", "$routeParams", "$location", function(GistService, $routeParams, $location) { + + var vm = this; + + vm.save = saveGist; + + vm.gist = {}; + + start(); + + // IF statement only works when edit + function start() { + + vm.gist.created_at = new Date(Date.now()); + if ($routeParams.gist_id) { + BlogpostService.get($routeParams.gist_id).then(function (resp) { + + vm.gist = resp.data; + vm.gist.created_at = vm.gist.created_at || new Date(Date.now()); + }); + } + } + + function saveGist () { + var method; + + method = $routeParams.gist._id ? "update" : "create"; + GistService[method](vm.gist).then(function (resp) { + $location.path("/gists/" + resp.data._id); + }); + } + }]); + +}()); diff --git a/src/js/gist-service.js b/src/js/gist-service.js new file mode 100644 index 0000000..901b1da --- /dev/null +++ b/src/js/gist-service.js @@ -0,0 +1,37 @@ +require("./gists-app.js"); + +(function () { + "use strict"; + + angular.module("gisty").service("GistService", ["$http", function ($http) { + var urlRoot = "/gists"; + + var Gist = { + get: function (id) { + if (angular.isDefined(id)) { + return $githubGist(id).read(); + } else { + // return $http.get(urlRoot); + console.warn('root url'); + } + }, + update: function (model) { + return $http.put(urlRoot + "/" + model._id, model); + }, + create: function (model) { + return $http.post(urlRoot, model, { + headers: { + 'Authorization': 'token ' + token, + /// THIS CAN get around the limit + } + }).then(success(function() { + $location.path("/gists/" + model._id); + }) + ), + delete: function (model) { + return $http.delete(urlRoot + "/" + model._id); + } + }; + return Gist; + }]); +}()); diff --git a/src/js/gistlist-ctrl.js b/src/js/gistlist-ctrl.js new file mode 100644 index 0000000..234b34c --- /dev/null +++ b/src/js/gistlist-ctrl.js @@ -0,0 +1,31 @@ +require("./gists-app.js"); + +(function() { + 'use strict'; + + angular.module("gisty").controller("GistListCtrl", ["GistService", function(GistService) { + var vm = this; + + vm.gistList = []; + vm.delete = deleteGist; + + start(); + + function start() { + getGistList(); + } + + function getGistList() { + GistService.get().then(function (resp) { + vm.gistList = resp.data; + }); + } + + function deleteGist (gist) { + GistService.delete(gist).then(function() { + getGistList(); + }); + } + + }]); +}()); diff --git a/src/js/gists-app.js b/src/js/gists-app.js index 57d4908..fa95ac6 100644 --- a/src/js/gists-app.js +++ b/src/js/gists-app.js @@ -9,26 +9,24 @@ var route = require('angular-route'); $routeProvider ////route home page blog posts////////// - .when("/blogposts", { + .when("/gists", { templateUrl: "html/blogpost.html", - controller: "GistsCtrl as vm", + controller: "GistListCtrl as vm", }) /////form to make more blog posts/////// - .when("/blogposts/new", { + .when("/gists/new", { templateUrl: "html/form.html", - controller: "GistsCtrl as vm", + controller: "GistFormCtrl as vm", }) - .when("/blogposts/:blog", { + .when("/gists/:id", { templateUrl: "html/blog.html", controller: "GistsCtrl as vm", }) - .otherwise({ - redirectTo: "/blogposts", + .otherwise({ + redirectTo: "/gists", }); - }]); - })(); From 88fe97431dd9b1916d627c1d84898b54f4acc002 Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 09:26:26 -0700 Subject: [PATCH 2/7] Keep playing --- src/js/entry.js | 6 +++--- src/js/gist-form-ctrl.js | 2 +- src/js/gist-service.js | 11 ++++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/js/entry.js b/src/js/entry.js index 34a2c51..e835d4c 100644 --- a/src/js/entry.js +++ b/src/js/entry.js @@ -2,8 +2,8 @@ require("./gists-app.js"); require("./gists-ctrl.js"); require("./gists-filters.js"); -// require("./gist-form-ctrl.js"); -// require("./gistlist-ctrl.js"); -// require("./gist-service.js"); +require("./gist-form-ctrl.js"); +require("./gistlist-ctrl.js"); +require("./gist-service.js"); // require("./gist-date-ctrl.js"); diff --git a/src/js/gist-form-ctrl.js b/src/js/gist-form-ctrl.js index a2bf23c..6c35702 100644 --- a/src/js/gist-form-ctrl.js +++ b/src/js/gist-form-ctrl.js @@ -3,7 +3,7 @@ require("./gists-app.js"); (function() { 'use strict'; - angular.module("gisty").controller("GistFormCtrl", ["GistService", "$routeParams", "$location", function(GistService, $routeParams, $location) { + angular.module("gisty").controller("GistFormCtrl", ["GistService", "$routeParams", "$location", function (GistService, $routeParams, $location) { var vm = this; diff --git a/src/js/gist-service.js b/src/js/gist-service.js index 901b1da..67a0d47 100644 --- a/src/js/gist-service.js +++ b/src/js/gist-service.js @@ -22,16 +22,17 @@ require("./gists-app.js"); return $http.post(urlRoot, model, { headers: { 'Authorization': 'token ' + token, - /// THIS CAN get around the limit } }).then(success(function() { - $location.path("/gists/" + model._id); - }) - ), + $location.path(urlRoot + model._id); + })); + }, + delete: function (model) { return $http.delete(urlRoot + "/" + model._id); } - }; return Gist; + }, }]); + }()); From 6db3f0656524ca868a6cb87c8272c1ca8f759f31 Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 09:34:34 -0700 Subject: [PATCH 3/7] Keep messing with service and controllers and form --- src/html/blogpost.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/blogpost.html b/src/html/blogpost.html index fa0b941..d4010ca 100644 --- a/src/html/blogpost.html +++ b/src/html/blogpost.html @@ -26,7 +26,7 @@

Blog

-

{{error}}

+

{{error}}

There are no error! From 8c82857b0efa4d9e29d901db89bb62cd7adde2fd Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 12:32:12 -0700 Subject: [PATCH 4/7] Continue playground with landmines --- build/html/blogpost.html | 133 ++++++++++++++++++------------------- build/html/form.html | 2 +- build/index.html | 13 ++-- src/html/blog.html | 14 ++-- src/html/blogpost.html | 53 ++++++++------- src/html/form.html | 2 +- src/index.html | 9 ++- src/js/entry.js | 6 +- src/js/gist-date-ctrl.js | 2 +- src/js/gist-service.js | 14 ++-- src/js/gists-app.js | 4 +- src/js/gists-ctrl.js | 14 +--- src/js/single-gist-ctrl.js | 54 +++++++++++++++ 13 files changed, 188 insertions(+), 132 deletions(-) create mode 100644 src/js/single-gist-ctrl.js diff --git a/build/html/blogpost.html b/build/html/blogpost.html index fa0b941..a3cd124 100644 --- a/build/html/blogpost.html +++ b/build/html/blogpost.html @@ -1,79 +1,76 @@ -
- -
-

Blog

-

The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that

-
- - - -
- diff --git a/build/html/form.html b/build/html/form.html index e0b9f0e..85868a0 100644 --- a/build/html/form.html +++ b/build/html/form.html @@ -27,7 +27,7 @@

Add or Edit A Blogpost

{{vm.gist.description}} Public - Gist Username + Gist Username Date diff --git a/build/index.html b/build/index.html index c55b4a5..66da50f 100644 --- a/build/index.html +++ b/build/index.html @@ -36,13 +36,14 @@

intelly

-<<<<<<< HEAD -
-======= -
-
->>>>>>> master +
+ +
+
diff --git a/src/html/blog.html b/src/html/blog.html index c23a921..6165570 100644 --- a/src/html/blog.html +++ b/src/html/blog.html @@ -21,16 +21,18 @@

Blog

+ +
-
- Alina's big face +
+ Alina's big face

{{ gist.id }}

-

{{ gist.description }}

+

{{ vm.gist.description }}

View All Edit diff --git a/src/html/blogpost.html b/src/html/blogpost.html index d9d3978..a3cd124 100644 --- a/src/html/blogpost.html +++ b/src/html/blogpost.html @@ -1,27 +1,26 @@ - -
-

Blog

-

The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that

-
+ +
+

Blog

+

The secular cooling that must someday overtake our planet has already gone far indeed with our neighbour. Its physical condition is still largely a mystery, but we know now that

+
- -
- Add New + Add New diff --git a/src/html/form.html b/src/html/form.html index e0b9f0e..85868a0 100644 --- a/src/html/form.html +++ b/src/html/form.html @@ -27,7 +27,7 @@

Add or Edit A Blogpost

{{vm.gist.description}} Public - Gist Username + Gist Username Date diff --git a/src/index.html b/src/index.html index 1542799..66da50f 100644 --- a/src/index.html +++ b/src/index.html @@ -36,9 +36,14 @@

intelly

-
-
+
+ +
+
diff --git a/src/js/entry.js b/src/js/entry.js index e835d4c..487edeb 100644 --- a/src/js/entry.js +++ b/src/js/entry.js @@ -1,9 +1,11 @@ require("./gists-app.js"); +require("./gist-service.js"); + require("./gists-ctrl.js"); require("./gists-filters.js"); require("./gist-form-ctrl.js"); -require("./gistlist-ctrl.js"); -require("./gist-service.js"); +// require("./gistlist-ctrl.js"); +require("./single-gist-ctrl.js"); // require("./gist-date-ctrl.js"); diff --git a/src/js/gist-date-ctrl.js b/src/js/gist-date-ctrl.js index 55e6d53..e374f97 100644 --- a/src/js/gist-date-ctrl.js +++ b/src/js/gist-date-ctrl.js @@ -1,4 +1,4 @@ -require('./gists-app.js'); +// require('./gists-app.js'); // Controller to make DATE work! (function() { diff --git a/src/js/gist-service.js b/src/js/gist-service.js index 67a0d47..43e9631 100644 --- a/src/js/gist-service.js +++ b/src/js/gist-service.js @@ -1,15 +1,21 @@ -require("./gists-app.js"); +var app = require("./gists-app.js"); (function () { "use strict"; - angular.module("gisty").service("GistService", ["$http", function ($http) { + angular.module("gisty").service("GistService", ["$http", "token", function ($http, token) { + var urlRoot = "/gists"; var Gist = { get: function (id) { if (angular.isDefined(id)) { - return $githubGist(id).read(); + // return $githubGist(id).read(); + return $http.get("https://api.github.com" + urlRoot + "/" + id, { + headers: { + 'Authorization': 'token ' + token, + } + }); } else { // return $http.get(urlRoot); console.warn('root url'); @@ -31,8 +37,8 @@ require("./gists-app.js"); delete: function (model) { return $http.delete(urlRoot + "/" + model._id); } + }; return Gist; - }, }]); }()); diff --git a/src/js/gists-app.js b/src/js/gists-app.js index cc3487b..b1f3261 100644 --- a/src/js/gists-app.js +++ b/src/js/gists-app.js @@ -17,11 +17,11 @@ var route = require('angular-route'); /////form to make more blog posts/////// .when("/gists/new", { templateUrl: "html/form.html", - controller: "GistsCtrl", + controller: "GistFormCtrl", }) .when("/gists/:id", { templateUrl: "html/blog.html", - controller: "GistsCtrl", + controller: "SingleGistCtrl", }) .otherwise({ redirectTo: "/gists", diff --git a/src/js/gists-ctrl.js b/src/js/gists-ctrl.js index f818273..724764c 100644 --- a/src/js/gists-ctrl.js +++ b/src/js/gists-ctrl.js @@ -1,5 +1,5 @@ require('./gists-app.js'); -// require('./gists-filter.js'); + //http.get can pass in a URL, then a config stuff like headers // get only accept 2 arguments @@ -7,7 +7,7 @@ require('./gists-app.js'); // { gist_id: "123",}, {headers: {..."}};... // ========= START OF CONTROLLER ======= // -angular.module('gisty').controller('GistsCtrl', function($scope, $http, $log, token) { +angular.module('gisty').controller('GistsCtrl', function ($scope, $http, $log, token) { $scope.pagination = { currentPage: 0, @@ -26,15 +26,11 @@ angular.module('gisty').controller('GistsCtrl', function($scope, $http, $log, to $http.get('https://api.github.com/users/toalina/gists', { headers: { 'Authorization': 'token ' + token, - /// THIS CAN get around the limit } }).then(successHandler, errorHandler); // .then() accpet 2 arguments function successHandler(response) { var data = response.data; - // data = angular.isArray(data) ? data : [data]; - // if it's an array, OK! If not, Stick it into an array - $scope.gists = response.data; $log.info('response', response); } // object comes with property of data @@ -43,12 +39,6 @@ angular.module('gisty').controller('GistsCtrl', function($scope, $http, $log, to $scope.error = response.data; $log.error('response', response); } - - function deleteGist(id) { - $http.delete('https://api.github.com/users/toalina/gists/' + id ); - - } - }); // square brackets [ ] is just to say explicitly we need to use this, // then inject within the () diff --git a/src/js/single-gist-ctrl.js b/src/js/single-gist-ctrl.js new file mode 100644 index 0000000..9fd7a54 --- /dev/null +++ b/src/js/single-gist-ctrl.js @@ -0,0 +1,54 @@ +require("./gists-app"); + +angular.module('gisty').controller("SingleGistCtrl", ["GistService", "$scope", "$routeParams", "$log", function (GistService, $scope, $routeParams, $log) { + + // $scope.id = gists_id; + + start(); + + function start() { + + GistService.get($routeParams.gist_id) + + // $http.get('https://api.github.com/gists/' + gist.id, { + // headers: { + // 'Authorization': 'token ' + token, + // } + // }) + + .then(successHandler, errorHandler); + } + + function successHandler(response) { + var data = response.data; + console.log(data); + $scope.gists = response.data; + $log.info('response', response); + } // object comes with property of data + + function errorHandler(response) { + $scope.error = response.data; + $log.error('response', response); + } + // .then(function(resp) { + + // console.log(resp); + + // vm.gist = {}; + + // vm.gist.description = ''; + + // for (file in resp.files) { + // vm.gist.filename += resp.files[file].filename; + // } + + // vm.gist.public = resp.public; + // vm.gist.owner.login = resp.owner.login; + + // }); + +}]); + + + + From 6347f19a7852af7a2fe2f7bd2d93c2e308ef2b91 Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 13:58:29 -0700 Subject: [PATCH 5/7] Modify form-ctrl.js --- build/html/form.html | 1 + src/html/blog.html | 6 ++++-- src/html/form.html | 3 +++ src/js/entry.js | 2 +- src/js/gist-form-ctrl.js | 41 ++++++++++++++++++++++++++++++++++++++ src/js/gist-service.js | 23 +++++++++++---------- src/js/gists-app.js | 1 + src/js/single-gist-ctrl.js | 5 ++++- 8 files changed, 67 insertions(+), 15 deletions(-) diff --git a/build/html/form.html b/build/html/form.html index 85868a0..35ba025 100644 --- a/build/html/form.html +++ b/build/html/form.html @@ -25,6 +25,7 @@

Add or Edit A Blogpost

Gist Description {{vm.gist.description}} + Public Gist Username diff --git a/src/html/blog.html b/src/html/blog.html index 6165570..215eaa7 100644 --- a/src/html/blog.html +++ b/src/html/blog.html @@ -28,13 +28,15 @@

Blog

Alina's big face

{{ gist.id }}

-

{{ vm.gist.description }}

+

{{ gist.description }}

- View All + + View All Edit +
diff --git a/src/html/form.html b/src/html/form.html index 85868a0..a309897 100644 --- a/src/html/form.html +++ b/src/html/form.html @@ -25,6 +25,9 @@

Add or Edit A Blogpost

Gist Description {{vm.gist.description}} + + + Public Gist Username diff --git a/src/js/entry.js b/src/js/entry.js index 487edeb..a000e72 100644 --- a/src/js/entry.js +++ b/src/js/entry.js @@ -4,7 +4,7 @@ require("./gist-service.js"); require("./gists-ctrl.js"); require("./gists-filters.js"); -require("./gist-form-ctrl.js"); +// require("./gist-form-ctrl.js"); // require("./gistlist-ctrl.js"); require("./single-gist-ctrl.js"); diff --git a/src/js/gist-form-ctrl.js b/src/js/gist-form-ctrl.js index 6c35702..a5f1a3c 100644 --- a/src/js/gist-form-ctrl.js +++ b/src/js/gist-form-ctrl.js @@ -27,13 +27,54 @@ require("./gists-app.js"); } function saveGist () { + var method; method = $routeParams.gist._id ? "update" : "create"; + + vm.gist.files = {}; + + if (!vm.oldFilename) { + vm.gist.files[vm.oldFilename] = { + filename: + + } + } + + vm.gist.files[vm.newFilename] = { + "content": "vm.newContent"; + }; + + GistService[method](vm.gist).then(successHandler, errorHandler); + + GistService[method](vm.gist).then(function (resp) { $location.path("/gists/" + resp.data._id); }); + } }]); }()); + + +/// success/error handler for saveGist function + +function successHandler(response) { + vm.gist = response.data; + vm.newFilename = Object.keys(vm.gist.files)[0]; + vm.newContent = vm.gist.files[vm.newFilename].content; + + $log.info("response", response); + $log.info(vm.gist); +} + +function errorHandler (response) { + $log.error("response", response); +} +if ($routeParams.gist_id) { + GistService.get($routeParams.gist_id).then(function() + + ) +} +} diff --git a/src/js/gist-service.js b/src/js/gist-service.js index 43e9631..2c1cb36 100644 --- a/src/js/gist-service.js +++ b/src/js/gist-service.js @@ -5,16 +5,15 @@ var app = require("./gists-app.js"); angular.module("gisty").service("GistService", ["$http", "token", function ($http, token) { - var urlRoot = "/gists"; + var urlRoot = "https://api.github.com"; + var username = "toalina"; var Gist = { get: function (id) { if (angular.isDefined(id)) { // return $githubGist(id).read(); - return $http.get("https://api.github.com" + urlRoot + "/" + id, { - headers: { - 'Authorization': 'token ' + token, - } + return $http.get(urlRoot + "users/" + username + "/gists/", { + headers: {'Authorization': 'token ' + token,} }); } else { // return $http.get(urlRoot); @@ -22,20 +21,22 @@ var app = require("./gists-app.js"); } }, update: function (model) { - return $http.put(urlRoot + "/" + model._id, model); + return $http.patch(urlRoot + "/gists/" + model.id, model, { + headers: { + 'Authorization': 'token ' + token, + } + }); }, create: function (model) { - return $http.post(urlRoot, model, { + return $http.patch(urlRoot + "/gists", model, { headers: { 'Authorization': 'token ' + token, } - }).then(success(function() { - $location.path(urlRoot + model._id); - })); + }); }, delete: function (model) { - return $http.delete(urlRoot + "/" + model._id); + return $http.delete(urlRoot + "/gists/" + model._id); } }; return Gist; diff --git a/src/js/gists-app.js b/src/js/gists-app.js index b1f3261..7d7e896 100644 --- a/src/js/gists-app.js +++ b/src/js/gists-app.js @@ -3,6 +3,7 @@ var route = require('angular-route'); (function() { 'use strict'; + var app = angular.module('gisty', ['ngRoute', 'gisty.config']). config(["$routeProvider", function ($routeProvider, $scope) { diff --git a/src/js/single-gist-ctrl.js b/src/js/single-gist-ctrl.js index 9fd7a54..a849baa 100644 --- a/src/js/single-gist-ctrl.js +++ b/src/js/single-gist-ctrl.js @@ -1,8 +1,11 @@ -require("./gists-app"); +require("./gists-app.js"); angular.module('gisty').controller("SingleGistCtrl", ["GistService", "$scope", "$routeParams", "$log", function (GistService, $scope, $routeParams, $log) { // $scope.id = gists_id; + console.log("params: " + $routeParams.gist_id); + console.log("gist.id: " + gist.id); + start(); From df87c5f55227852a469c019f3fd67a2d5820f32d Mon Sep 17 00:00:00 2001 From: Alina To Date: Thu, 15 Oct 2015 14:26:38 -0700 Subject: [PATCH 6/7] Able to view single gist --- build/html/form.html | 4 +++- src/html/blog.html | 2 +- src/js/gist-service.js | 2 +- src/js/single-gist-ctrl.js | 8 +++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/html/form.html b/build/html/form.html index 35ba025..a309897 100644 --- a/build/html/form.html +++ b/build/html/form.html @@ -25,7 +25,9 @@

Add or Edit A Blogpost

Gist Description {{vm.gist.description}} - + + + Public Gist Username diff --git a/src/html/blog.html b/src/html/blog.html index 215eaa7..73418c8 100644 --- a/src/html/blog.html +++ b/src/html/blog.html @@ -27,7 +27,7 @@

Blog

Alina's big face -

{{ gist.id }}

+

{{ gists.id }}

{{ gist.description }}