diff --git a/index.html b/index.html index 171c117..386caeb 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,7 @@ + diff --git a/js/controllers/home-controller.js b/js/controllers/home-controller.js index 068aea5..041669d 100644 --- a/js/controllers/home-controller.js +++ b/js/controllers/home-controller.js @@ -1,16 +1,13 @@ app.controller('homeCtrl', [ - '$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org' -, function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) { + '$rootScope', '$scope', 'Auth', 'localStorageService', '$location', 'azp@oauth3.org', + function ($rootScope, $scope, Auth, localStorageService, $location, Oauth3) { var vm = this; vm.oauth3 = Oauth3.oauth3; - vm.notification = true; + vm.achievement = true; - vm.userName = function(profile){ - profile = Auth.getProfile(); - return profile.email; - }; + vm.notificationMessage = "testing stuff..."; throw new Error('loaded home controller'); }]); diff --git a/js/directives/achievement-directive.js b/js/directives/achievement-directive.js new file mode 100644 index 0000000..548152b --- /dev/null +++ b/js/directives/achievement-directive.js @@ -0,0 +1,7 @@ +app.directive('achievementDirective', function() { + return { + templateUrl: "templates/widgets/achievement-widget.html", + controller: 'homeCtrl', + controllerAs: 'vm' + }; +}); diff --git a/js/directives/notification-directive.js b/js/directives/notification-directive.js index 7dad58a..cd1ad3c 100644 --- a/js/directives/notification-directive.js +++ b/js/directives/notification-directive.js @@ -1,5 +1,7 @@ app.directive('notificationDirective', function() { return { - templateUrl: "templates/widgets/notification-widget.html" + templateUrl: "templates/widgets/notification-widget.html", + controller: 'homeCtrl', + controllerAs: 'vm' }; }); diff --git a/templates/home.html b/templates/home.html index 5761389..463c64c 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,5 +1,7 @@
+
+
diff --git a/templates/widgets/achievement-widget.html b/templates/widgets/achievement-widget.html new file mode 100644 index 0000000..f8dd4b8 --- /dev/null +++ b/templates/widgets/achievement-widget.html @@ -0,0 +1,14 @@ +
+
+ Congratulations: Award Unlocked (just for fun) + +
+ +
+ +
+ +

Welcome:

+
+
+
diff --git a/templates/widgets/notification-widget.html b/templates/widgets/notification-widget.html index 90e0c2b..37fb0ab 100644 --- a/templates/widgets/notification-widget.html +++ b/templates/widgets/notification-widget.html @@ -1,14 +1,4 @@ -
-
- Congratulations: Award Unlocked (just for fun) - -
- -
- -
- -

Welcome: {{ vm.userName() }}

-
-
-
+ + + +