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

Advertisements

A short introduction to Firebase

firebaselogoFirebase is a powerful API to store and sync data in realtime helping front-end developers build realtime apps for the web. You can save data, update data, and listen for data changes in realtime with only a few lines of code. Data is stored as standard JSON and is accessible from any platform. Firebase also has safety and security built in to keep your data and your users data safe.

Adding Firebase to the page

In order to use Firebase in your application you have to incluse the firebase js reference in the page header.

<script src="https://cdn.firebase.com/js/client/2.0.2/firebase.js"></script>
 

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