angular2-rx
angular2-rx copied to clipboard
A playground for Angular2 and RxJs. Also uses new Router.
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.tsinside/src/app/components/app.ts
$ npm start
Getting Started
Dependencies
What you need to run this app:
nodeandnpm(brew install node)- Ensure you're running the latest versions Node
v0.12.2+ and NPM2.10.0+
Once you have those, you should install these globals with npm install -global:
webpack(npm install -global webpack)webpack-dev-server(npm install -global webpack-dev-server)
Installing
forkthis repocloneyour forknpm installto install all dependenciesnpm run serverto start the server
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 pathfor 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:
- Visual Studio Code
- Webstorm 10
- Atom with TypeScript plugin
- Sublime Text with Typescript-Sublime-Plugin
Todo
- img for 'X' in tic-tac-toe doesn't load after moving to Angular alpha.30. Makes no sense!
- Strange TS warnings on autosuggest.ts and github.ts - need to fix that.
- production/development environments
- testing
- e2e
- production services examples
- hot-component-reloading