@@ -5,7 +5,7 @@ import template from './games-category.html';
55
66const GamesCategoryComponent = { controller, template } ;
77
8- function controller ( $q , $state , $stateParams , $window , WikiService , langService , wikidata ) {
8+ function controller ( $mdToast , $ q, $state , $stateParams , $window , WikiService , langService , wikidata ) {
99 const vm = this ;
1010 const id = $stateParams . country . includes ( 'Q' ) ? $stateParams . country : `Q${ $stateParams . country } ` ;
1111
@@ -14,7 +14,7 @@ function controller($q, $state, $stateParams, $window, WikiService, langService,
1414 { name : 'Germany' , code : 'Q183' } ,
1515 { name : 'Great Britain' , code : 'Q145' } ,
1616 { name : 'Poland' , code : 'Q36' } ,
17- { name : 'the United States ' , code : 'Q30' } ,
17+ { name : 'the USA ' , code : 'Q30' } ,
1818 ] ;
1919 vm . country = id || 'Q36' ;
2020 vm . loading = true ;
@@ -113,6 +113,7 @@ function controller($q, $state, $stateParams, $window, WikiService, langService,
113113 } ) . catch ( ( err ) => {
114114 item . error = err ;
115115 item . loading = false ;
116+ $mdToast . show ( $mdToast . simple ( ) . textContent ( `Error: ${ err } ` ) . hideDelay ( 3000 ) ) ;
116117 } ) ;
117118 }
118119 }
0 commit comments