Install the npm packages described in the package.json
and verify that it works:
git clone https://github.com/ui-router/quickstart-ng2.git
cd quickstart-ng2
npm install
npm run tsc
npm start
ui-router-ng2
in package.json"ui-router-ng2"
UIView
component, or add a <ui-view></ui-view>
viewport to your root component.ui-view
viewports with component.UIRouterConfig
and apply any router config in the UIRouterConfig.configure()
function.@UIRouterModule
. Provide UI-Router using the provideUIRouter
helper.lazyLoad
functionYou're ready to write your application.
Remember the npm scripts in package.json
:
npm start
- runs the compiler and a server at the same time, both in "watch mode".npm run tsc
- runs the TypeScript compiler once.npm run tsc:w
- runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.npm run lite
- runs the lite-server, a light-weight, static file server, written and maintained by
John Papa and
Christopher Martin
with excellent support for Angular apps that use routing.npm run typings
- runs the typings tool.npm run postinstall
- called by npm automatically after it successfully completes package installation. This script installs the TypeScript definition files this app requires.(This repo is forked from https://github.com/angular/quickstart)