Generate a project that uses angular2, systemjs, and typescript.
Then generate Angular2 features inside that project.
Install package globally (requires slush):
npm i -g slush-angular2 [slush]
Run the generator:
slush angular2 [<name>]
After generation, the TypeScript compiler will start in watch mode and live-server will open your browser to the new directory.
Use these tasks to build corresponding Angular2 features:
- component
- directive
- pipe
- service
Run in root of project with task:
slush angular2:<task> [<name>]
Import your new TypeScript files by their path, ie.
./path
, omitting the.ts
extension.To manually start compiler and server run:
npm start
- index.html <-- Entry point for application.
- tsconfig.json <-- Configuration for TypeScript compiler.
- res/ <-- Shared resources: images, styling, etc.
- src/ <-- TypeScript goes in here.
- boot.ts <-- Strapping boots.
- component/
- directives/
- service/
- dist/ <-- JavaScript comes out here.
- Fix example.
- Tests.
- Stop forgetting tests.
There are no guidelines for contributing. If you find a problem or have a suggestion go ahead and submit an issue.