Display a table in Angular styled with Bootstrap CSS and Material UI.
This project demonstrates how to use Angular and TypeScript to render a table of data using Bootstrap CSS and Material UI. The data is loaded from an Angular service hosted on localhost using json-server
and rendered in the table.
This project is an extension of Hello World, Angular, which was originally designed as an isomorphic web application using Angular on the frontend and a C# .NET Core REST API as the backend. This project simplifies the example using json-server
as the backend to serve a local JSON file as a datasource, and demonstrates the differences in style between Bootstrap and Material UI.
To launch the application, follow these steps:
-
Install the dependencies:
npm install
-
Start the
json-server
to serve the data:npx json-server --watch db.json
-
In a separate terminal, start the Angular development server:
ng serve
-
Open your browser and navigate to
http://localhost:4200/
.
To generate a new Angular component, run:
ng generate component component-name
To generate a new Angular service, run:
ng generate service service-name
To generate a new Angular interface, run:
ng generate interface interface-name
- Angular
- TypeScript
- VSCode
- json-server: A full fake REST API
- Bootstrap CSS
- Material UI
MIT
Kory Becker http://www.primaryobjects.com/kory-becker