diff --git a/src/assets/scripts/dashboard/dashboard.controller.js b/src/assets/scripts/dashboard/dashboard.controller.js index a6e87f8..14d06ce 100644 --- a/src/assets/scripts/dashboard/dashboard.controller.js +++ b/src/assets/scripts/dashboard/dashboard.controller.js @@ -3,10 +3,20 @@ import chart from "../charts/chartJS"; import pieChart from "../charts/easyPieChart"; /** @ngInject */ -const DashboardController = ($scope, UserService) => { +const DashboardController = ($scope, AdsService, UserService) => { $scope.$on('loadUserSuccess', function(event, user) { $scope.user = user; }); + + //link al ad-detail + $scope.$on('loadUserSuccess', async (event, user) => { + await AdsService.fetchAdsService() + .then( (result) => { $scope.ads = result; }) + .catch( (error) => { console.log(error); }) + }); + + + // tutte le funzioni del controller UserService.loadUser(); @@ -15,4 +25,5 @@ const DashboardController = ($scope, UserService) => { pieChart(); } -export default DashboardController; \ No newline at end of file +export default DashboardController; + diff --git a/src/assets/scripts/dashboard/dashboard.html b/src/assets/scripts/dashboard/dashboard.html index a6c280e..e1d52d0 100644 --- a/src/assets/scripts/dashboard/dashboard.html +++ b/src/assets/scripts/dashboard/dashboard.html @@ -202,65 +202,34 @@
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
+
-
-
- Some quick example text to build on the card title and make up the bulk of the - card's content.
+ +
- Some quick example text to build on the card title and make up the bulk of the - card's content.
-
-
+ Some quick example text to build on the card title and make up the bulk of the - card's content.
-{{ ad.description }}
+ +{{ ad.companyintro }}