This project was generated with Angular CLI version 1.0.0.
- Install Node.js on your machine
- Install Angular CLI
npm install -g @angular/cli
- Clone this repository
git clone https://github.com/duk/bhn-ui-angular-poc.git
cd bhn-ui-angular-poc
npm install
npm serve --open
- If you want to add new angular component, run
ng g component component-name
You can see the demo here
If you open up /src/app/app.component.html, the entire page is composed of our angular "bhn" components. With angular and by following its guidelines, we can truly decouple UI development from API development.
<div class="container">
<app-bhn-nav></app-bhn-nav>
<app-bhn-tabs></app-bhn-tabs>
<div class="columns">
<div class="column is-one-quarter">
<!--<app-bhn-menu></app-bhn-menu>-->
<app-bhn-panel></app-bhn-panel>
<app-bhn-card></app-bhn-card>
</div>
<div class="column">
<app-bhn-message></app-bhn-message>
<!--<app-bhn-box></app-bhn-box>-->
<app-bhn-table></app-bhn-table>
<app-bhn-pagination></app-bhn-pagination>
</div>
</div>
</div>
If we are planning to start a fresh new project, I would recommend angular. And here are my reasons.
- It's opinionated. It comes with strict guidelines as how and where things should go. We don't have waste days debating about how we should do things.
- TypeScript. Bringing types to frontend helps us to catch things at compile time.
- Made by Google. Yup. I heard they hire brightest engineers. :)
- Let's not build from scatch. We need to focus on business and our API performance, not UI. This UI is using an awesome CSS framework called Bulma. Let's leverage open source as much as we can. There is no reason to reinvent that is resulting in subpar outcome.