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 @@
+ +Welcome:
+Welcome: {{ vm.userName() }}
-