SekibOmazic / angular2-rx

A playground for Angular2 and RxJs. Also uses new Router.
MIT License
20 stars 4 forks source link

Angular2 RxJs playground

This repo serves as a playground for Angular2 and RxJs.

Based on angular2-webpack-starter. Good job @gdi2290!

Important notice

This repository is no longer maintained. All examples have been moved to angular2-webpack-starter

Quick start

Clone/Download the repo then edit app.ts inside /src/app/components/app.ts

$ npm start

Getting Started

Dependencies

What you need to run this app:

Once you have those, you should install these globals with npm install -global:

Installing

Running the app

After you have installed all dependencies you can now run the app. Run npm server to start a local server using webpack-dev-server which will watch, build (in-memory), and reload for you. The port will be displayed to you as http://localhost:8080.

server

$ npm run server

build files

$ npm run build

watch and build files

$ npm run watch

TypeScript

To take full advantage of TypeScript with autocomplete you would have to install it globally and use an editor with the correct TypeScript plugins.

Use latest TypeScript compiler

TypeScript 1.5 beta includes everything you need. Make sure to upgrade, even if you installed TypeScript previously.

$ npm install -global typescript@^1.5.0-beta

.d.ts Typings

The typings in typings/ are partially autogenerated, partially hand written. All the symbols should be present, but probably have wrong paramaters and missing members. Modify them as you go.

$ npm install -global tsd

You may need to require reference path for your editor to autocomplete correctly

/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../custom_typings/ng2.d.ts" />

Otherwise including them in tsd.json is prefered

Use a TypeScript-aware editor

We have good experience using these editors:

Todo