Angular 2.0 – real-time components using Firebase

In earlier post we saw how to build a hello world web component using Angular 2.0 beta.
Now we will create a real-time component using Firebase. We will have 2 components:

  1. adding elements in the list component
  2. listing all the elements component

To build the first component for adding elements in a list, we just need a simple HTML with 2 fields and a button, and some small JS method to send these fields to Firebase.

Continue reading

Advertisements

Angular 2.0 – how to build a component

shield-with-betaHow to create a simple hello-world component and use it in the index page. We will use TypeScript and Html in the example bellow. To run the example you will need the npm installed.

The structure that we will need:

  • hello_world_app
    • index.html
    • app
      • main.ts
      • hello_world.ts
    • package.json
    • tsconfig.json

Continue reading

A short introduction to Angular 2.0

shield-with-beta

Although the internals of Angular 2 are still changing, the beta version of the API was released in December 2015 and you can use it to build your apps. The components are better isolated in Angular 2 and if the notions of properties and events are well applied, its simpler to write truly reusable components that can be understood just by looking at an html template.

Browser components

Continue reading