This week we'll build a small Angular web app using a public dataset, Angular components, and third-party JavaScript and CSS libraries.
NOTE: you can also find similar walk-throughs and source code for building this app in Vue and React for comparison.
The data we'll use is based on a freely available government dataset of bridges in the province of Ontario. We'll use this data under the Open Government Licence - Ontario.
Our goal will be to create an app that lets us explore the data set visually, like the following:
I've recorded a series of YouTube videos showing how to build the code, and explaining how everything works:
- Introduction
- How to develop, build, run, and debug our code
- Creating the app's overall layout and main components
- Working with the Bridge data, creating the Menu component
- Creating the bridge info panel and map components
- Adding the map backend, connecting everything
- Switching to Angular Routing
- Creating an Express REST API for Bridge Data
- Reworking the Menu component to use Angular Routing
- Adding a Service to use Angular's HttpClient to use our REST API
- Adding an Angular Template Driven Form
- Refactoring to a Reactive Form
- Using Angular Material Form Components
To install the development and runtime dependencies, run the npm install command.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.