diff --git a/index.html b/index.html index d7c2218..71b522e 100644 --- a/index.html +++ b/index.html @@ -45,10 +45,10 @@ } }); - app.component('NavBar', NavBar); app.component('TeamCard', TeamCard); app.component('NewsCard',NewsCard); app.component('HomeModule',HomeModule); + app.component('NavBar', NavBar); app.mount('#app'); diff --git a/src/view/home-module.js b/src/view/home-module.js index 6e4a9da..6634771 100644 --- a/src/view/home-module.js +++ b/src/view/home-module.js @@ -1,12 +1,16 @@ export default{ - data: function(){ - return{ - - } + props:{ + news:[] + }, + data:function(){ + return {} }, methods:{ - }, - layout:` + template:` +

Home

+
+ +
` } \ No newline at end of file diff --git a/src/view/nav-bar.js b/src/view/nav-bar.js index 0ebf102..86e62ca 100644 --- a/src/view/nav-bar.js +++ b/src/view/nav-bar.js @@ -25,8 +25,9 @@ export default{ }, clickHome: function() { if(!this.homeClicked){ - const api = NewsService(); - this.news = api.get(); + const api = new NewsService(); + this.news = api.getNews(); + console.log(this.news); this.homeClicked=true; this.teamClicked=false; } @@ -113,12 +114,8 @@ export default{ Teams Results -
-

Homeee

-
- -
-
+ +