Hi Anthony, awesome module many thanks. I upgraded Angular and Material to 10 and select country to 1.3.0
1)
Had this error : No suitable injection token for parameter 'iconRegistry' of
class 'MatSelectCountryModule'. no type or decorator - app not running, any guiding help well appreciated.
1.1) I added IconRegistry and sanitizer to constructor of
"node_modules@angular-material-extensions\select-country_ivy_ngcc_\fesm2015\angular-material-extensions-select-country.js"
ERROR 2 happened after doing so :
- Cannot read property 'addSvgIcon' of undefined
at MatSelectCountryModule.registerCountries
2.2) WHen i comment out the code below in ivy file, app runs, doesnt show icons, i get why.
Commented out code in "node_modules@angular-material-extensions\select-country_ivy_ngcc_\fesm2015\angular-material-extensions-select-country.js"
CODE BELOW :
this.iconRegistry.addSvgIcon(countryAlpha2Code, this.sanitizer.bypassSecurityTrustResourceUrl(assets/svg-country-flags/svg/${countryAlpha2Code}.svg
));
2.3) when i uncomment code the app doesnt run at all, and error 2 is shown in console.
MY DEV ENVIRONMENT IS :
Angular Version =
@angular-devkit/architect 0.1000.6
@angular-devkit/build-angular 0.1000.6
@angular-devkit/build-optimizer 0.1000.6
@angular-devkit/build-webpack 0.1000.6
@angular-devkit/core 10.0.6
@angular-devkit/schematics 10.0.6
@angular/cdk 10.1.3
@angular/cli 10.0.6
@angular/flex-layout 10.0.0-beta.32
@angular/material 10.1.3
@ngtools/webpack 10.0.6
@schematics/angular 10.0.6
@schematics/update 0.1000.6
rxjs 6.5.5
typescript 3.9.7
webpack 4.43.0
Node Version :
v12.18.3
// package,json below :
"name": "",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular-material-extensions/select-country": "^1.3.0",
"@angular/animations": "^10.0.10",
"@angular/cdk": "^10.1.3",
"@angular/common": "^10.0.10",
"@angular/compiler": "^10.0.10",
"@angular/core": "^10.0.10",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "^10.0.10",
"@angular/material": "^10.0.0-rc.3",
"@angular/platform-browser": "^10.0.10",
"@angular/platform-browser-dynamic": "^10.0.10",
"@angular/router": "^10.0.10",
"@material/icon-button": "^4.0.0",
"@ngu/carousel": "^1.5.5",
"@types/snapsvg": "^0.5.0",
"get-svg-colors": "^1.5.1",
"jw-angular-pagination": "^1.2.0",
"ng-inline-svg": "^9.2.2",
"ng-starrating": "^1.0.20",
"ng2-search-filter": "^0.5.1",
"ngx-pagination": "^5.0.0",
"rxjs": "~6.5.5",
"snapsvg": "^0.5.1",
"svg-country-flags": "^1.2.7",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1000.6",
"@angular/cli": "^10.0.6",
"@angular/compiler-cli": "^10.0.10",
"@angular/language-service": "^10.0.10",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.12.54",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "^6.1.3",
"typescript": "^3.9.7"
}
}
angular.json below :
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "node_modules/svg-country-flags/svg",
"output": "assets/svg-country-flags/svg"
}
],
"styles": [
"./node_module
Originally posted by @impimediavillage in #24 (comment)