From 6c75e4bd7cec8220035feee2d37d10f1c69c6242 Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Tue, 16 May 2017 11:56:50 -0700 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 8880b612..180a5fb3 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,27 @@ angular.element(document).ready(function () { [_example_](https://github.com/ui-router/sample-app-angular-hybrid/blob/e4b1144d5e3e3451f0f0cc640175bb7055294fdd/app/bootstrap/bootstrap.ts#L78-L95) +#### Route to AngularJS components/templates + +Your existing AngularJS routes work the same as before. + +``` +var foo = { + name: 'foo', + url: '/foo', + component: 'fooComponent' +}; +$stateProvider.state(foo); + +var bar = { + name: 'foo.bar', + url: '/bar', + templateUrl: '/bar.html', + controller: 'BarController' +}; +$stateProvider.state(bar); +``` + #### Route to Angular components Register states using either Angular or AngularJS code.