This repo serves as a playground for Angular2 and RxJs.
Based on angular2-webpack-starter. Good job @gdi2290!
This repository is no longer maintained. All examples have been moved to angular2-webpack-starter
Clone/Download the repo then edit
app.ts
inside/src/app/components/app.ts
$ npm start
What you need to run this app:
node
and npm
(brew install node
)v0.12.2
+ and NPM 2.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
)fork
this repoclone
your forknpm install
to install all dependenciesnpm run server
to start the serverAfter 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
.
$ npm run server
$ npm run build
$ npm run watch
To take full advantage of TypeScript with autocomplete you would have to install it globally and use an editor with the correct TypeScript plugins.
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
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
We have good experience using these editors: