- Angular dev app that displays details about countries using data from the Rest Countries API.
- Note: to open web links in a new window use: ctrl+click on link

- Uses the model-view-viewmodel (MVVM) of Angular to bind the remote data that is stored in objects in the application template. The component plays the part of the controller/viewmodel. The template represents the view.
- Basic app that gets API country data and displays it in a flex grid
.
- Run
npm i to install dependencies.
- Run
ng serve for a dev server. Navigate to http://localhost:4200/. The app does automatically reload if you change any of the source files.
- Run
npm run build to create build files in docs folder. These will be deployed to github-pages. You need to copy the index.html file in the docs folder and paste it in the same folder with a new name of 404.html.
- extract from
data.service.ts to get country data using Angular httpClient module.
// function to get info for all countries
getCountries() {
return this.http
.get(`${this.API_URL}/all`)
.pipe(map(
result => this.result = result
));
}
- Angular httpClient used to get data from an API - no API key is required.
- Status: Working. Menu links do not work
- To-Do: Add user search of country etc. Menu
- This project is licensed under the terms of the MIT license.