|
| 1 | +/** |
| 2 | + * @ngdoc module |
| 3 | + * @name ngComponentRouter |
| 4 | + * @description |
| 5 | + * The new Angular Router |
| 6 | + */ |
| 7 | + |
| 8 | +/** |
| 9 | + * @ngdoc type |
| 10 | + * @name Router |
| 11 | + * @description |
| 12 | + * A `Router` is responsible for mapping URLs to components. |
| 13 | + * |
| 14 | + * * Routers and "Routing Component" instances have a 1:1 correspondence. |
| 15 | + * * The Router holds reference to one or more of Outlets. |
| 16 | + * * There are two kinds of Router: {@link RootRouter} and {@link ChildRouter}. |
| 17 | + * |
| 18 | + * You can see the state of a router by inspecting the read-only field `router.navigating`. |
| 19 | + * This may be useful for showing a spinner, for instance. |
| 20 | + * |
| 21 | + */ |
| 22 | + |
| 23 | +/** |
| 24 | + * @ngdoc type |
| 25 | + * @name ChildRouter |
| 26 | + * @description |
| 27 | + * |
| 28 | + * This type extends the {@link Router}. |
| 29 | + * |
| 30 | + * Apart from the **Top Level Component** ({@link $routerRootComponent}) which is associated with |
| 31 | + * the {@link $rootRouter}, every **Routing Component** is associated with a `ChildRouter`, |
| 32 | + * which manages the routing for that **Routing Component**. |
| 33 | + */ |
| 34 | + |
| 35 | +/** |
| 36 | + * @ngdoc type |
| 37 | + * @name RootRouter |
| 38 | + * @description |
| 39 | + * |
| 40 | + * This type extends the {@link Router}. |
| 41 | + * |
| 42 | + * There is only one instance of this type in a Component Router application injectable as the |
| 43 | + * {@link $rootRouter} service. This **Router** is associate with the **Top Level Component** |
| 44 | + * ({@link $routerRootComponent}). It acts as the connection betweent he **Routers** and the **Location**. |
| 45 | + */ |
| 46 | + |
| 47 | +/** |
| 48 | + * @ngdoc type |
| 49 | + * @name ComponentInstruction |
| 50 | + * @description |
| 51 | + * A `ComponentInstruction` represents the route state for a single component. An `Instruction` is |
| 52 | + * composed of a tree of these `ComponentInstruction`s. |
| 53 | + * |
| 54 | + * `ComponentInstructions` is a public API. Instances of `ComponentInstruction` are passed |
| 55 | + * to route lifecycle hooks, like `$routerCanActivate`. |
| 56 | + * |
| 57 | + * You should not modify this object. It should be treated as immutable. |
| 58 | + */ |
| 59 | + |
| 60 | +/** |
| 61 | + * @ngdoc type |
| 62 | + * @name RouteDefinition |
| 63 | + * @description |
| 64 | + * |
| 65 | + * Each item in a the **RouteConfig** for a **Routing Component** is an instance of |
| 66 | + * this type. It can have the following properties: |
| 67 | + * |
| 68 | + * * `path` or (`regex` and `serializer) - defines how to recognize and generate this route |
| 69 | + * * `component`, `loader`, `redirectTo` (requires exactly one of these) |
| 70 | + * * `name` - the name used to identify the **Route Definition** when generating links |
| 71 | + * * `data` (optional) |
| 72 | + */ |
| 73 | + |
| 74 | +/** |
| 75 | + * @ngdoc type |
| 76 | + * @name RouteParams |
| 77 | + * @description |
| 78 | + * A map of parameters for a given route, passed as part of the {@link ComponentInstruction} to |
| 79 | + * the Lifecycle Hooks, such as `$routerOnActivate` and `$routerOnDeactivate`. |
| 80 | + */ |
| 81 | + |
| 82 | +/** |
| 83 | + * @ngdoc directive |
| 84 | + * @name ngOutlet |
| 85 | + * @priority 400 |
| 86 | + * restrict: AE |
| 87 | + * @description |
| 88 | + * |
| 89 | + * The directive that identifies where the {@link Router} should render its **Components**. |
| 90 | + */ |
| 91 | + |
| 92 | +/** |
| 93 | + * @name ngLink |
| 94 | + * @description |
| 95 | + * |
| 96 | + * Lets you create links to different views, automatically generating the `href`. |
| 97 | + * |
| 98 | + * ## Use |
| 99 | + * Provide an array of {@link RouteDefinition} names and extra parameter objects: |
| 100 | + * |
| 101 | + * ```html |
| 102 | + * <a ng-link="['Parent', {param: 1}, 'Child']">Link to Child View</a> |
| 103 | + * ```` |
| 104 | + */ |
| 105 | + |
| 106 | + |
| 107 | +/** |
| 108 | + * @ngdoc service |
| 109 | + * @name $rootRouter |
| 110 | + * @description |
| 111 | + * The singleton instance of the {@link RootRouter} type, which is associated |
| 112 | + * with the top level {@link $routerRootComponent}. |
| 113 | + */ |
| 114 | + |
| 115 | + |
| 116 | +/** |
| 117 | + * @ngdoc service |
| 118 | + * @name $routerRootComponent |
| 119 | + * @description |
| 120 | + * |
| 121 | + * The top level **Routing Component** associated with the {@link $rootRouter}. |
| 122 | + */ |
0 commit comments