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
andnpm
(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
)
fork
this repoclone
your forknpm install
to install all dependenciesnpm run server
to start the server
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
.
$ 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:
- Visual Studio Code
- Webstorm 10
- Atom with TypeScript plugin
- Sublime Text with Typescript-Sublime-Plugin
- 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