forked from mmistakes/minimal-mistakes
/
index.html
285 lines (284 loc) · 14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
---
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>@uirouter/core</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="assets/css/main.css">
<link rel="stylesheet" href="assets/css/uirouter.css">
<script src="assets/js/modernizr.js"></script>
<script src="assets/js/reset.js"></script>
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="assets/js/search.js" data-base=".">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="index.html" class="title">@uirouter/core</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<!--
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
-->
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Internal UI-Router API</label>
<!--
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
-->
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="index.html">@uirouter/core</a>
</li>
</ul>
<h1> @uirouter/core</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<div class="tsd-panel tsd-typography">
<h1 id="ui-router-core-build-status">UI-Router Core <a href="https://travis-ci.org/ui-router/core"><img src="https://travis-ci.org/ui-router/core.svg?branch=master" alt="Build Status"></a></h1>
<p>UI-Router core provides client-side <a href="https://en.wikipedia.org/wiki/Single-page_application">Single Page Application</a>
routing for JavaScript.
This core is framework agnostic.
It is used to build
<a href="//ui-router.github.io/ng1">UI-Router for Angular 1</a>,
<a href="//ui-router.github.io/ng2">UI-Router for Angular 2</a>, and
<a href="//ui-router.github.io/react">UI-Router React</a>.</p>
<h2 id="spa-routing">SPA Routing</h2>
<p>Routing frameworks for SPAs update the browser's URL as the user navigates through the app. Conversely, this allows
changes to the browser's URL to drive navigation through the app, thus allowing the user to create a bookmark to a
location deep within the SPA.</p>
<p>UI-Router applications are modeled as a hierarchical tree of states. UI-Router provides a
<a href="https://en.wikipedia.org/wiki/Finite-state_machine"><em>state machine</em></a> to manage the transitions between those
application states in a transaction-like manner. </p>
<h2 id="features">Features</h2>
<p>UI-Router Core provides the following features:</p>
<ul>
<li>State-machine based routing<ul>
<li>Hierarchical states</li>
<li>Enter/Exit hooks</li>
</ul>
</li>
<li>Name based hierarchical state addressing<ul>
<li>Absolute, e.g., <code>admin.users</code></li>
<li>Relative, e.g., <code>.users</code></li>
</ul>
</li>
<li>Flexible Views<ul>
<li>Nested Views</li>
<li>Multiple Named Views</li>
</ul>
</li>
<li>Flexible URLs and parameters<ul>
<li>Path, Query, and non-URL parameters</li>
<li>Typed parameters <ul>
<li>Built in: <code>int</code>, <code>string</code>, <code>date</code>, <code>json</code></li>
<li>Custom: define your own encoding/decoding</li>
</ul>
</li>
<li>Optional or required parameters</li>
<li>Default parameter values (optionally squashed from URL)</li>
</ul>
</li>
<li>Transaction-like state transitions<ul>
<li>Transition Lifecycle Hooks</li>
<li>First class async support</li>
</ul>
</li>
</ul>
<h2 id="get-started">Get Started</h2>
<p>Get started using one of the existing UI-Router projects:</p>
<ul>
<li><a href="https://ui-router.github.io/ng1">UI-Router for Angular 1</a></li>
<li><a href="https://ui-router.github.io/ng2">UI-Router for Angular 2</a></li>
<li><a href="https://ui-router.github.io/react">UI-Router for React</a></li>
</ul>
<h2 id="build-your-own">Build your own</h2>
<p>UI-Router core can be used implement a router for any web-based component framework.
There are four basic things to build for a specific component framework:</p>
<h3 id="uiview">UIView</h3>
<p>A UIView is a component which acts as a viewport for another component, defined by a state.
When the state is activated, the UIView should render the state's component.</p>
<h3 id="uisref-optional-but-useful-">UISref (optional, but useful)</h3>
<p>A <code>UISref</code> is a link (absolute, or relative) which activates a specific state and/or parameters.
When the <code>UISref</code> is clicked, it should initiate a transition to the linked state.</p>
<h3 id="uisrefactive-optional-">UISrefActive (optional)</h3>
<p>When combined with a <code>UISref</code>, a <code>UISrefActive</code> toggles a CSS class on/off when its <code>UISref</code> is active/inactive.</p>
<h3 id="bootstrap-mechanism-optional-">Bootstrap mechanism (optional)</h3>
<p>Implement framework specific bootstrap requirements, if any.
For example, UI-Router for Angular 1 and Angular 2 integrates with the ng1/ng2 Dependency Injection lifecycles.
On the other hand, UI-Router for React uses a simple JavaScript based bootstrap, i.e., <code>new UIRouterReact().start();</code>.</p>
<h2 id="getting-help">Getting help</h2>
<p><a href="https://github.com/ui-router/core/issues">Create an issue</a> or contact us on <a href="https://gitter.im/angular-ui/ui-router">Gitter</a>.</p>
</div>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals current ">
<a href="index.html"><em>@uirouter/core</em></a>
</li>
<li class="label tsd-is-external">
<span>Public API</span>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/core.html">core</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/params.html">params</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/resolve.html">resolve</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/transition.html">transition</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/url.html">url</a>
</li>
<li class=" tsd-kind-external-module">
<a href="modules/view.html">view</a>
</li>
<li class="label tsd-is-external">
<span>Internal UI-<wbr><wbr>Router API</span>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/common.html">common</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/common_hof.html">common_<wbr>hof</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/common_predicates.html">common_<wbr>predicates</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/common_strings.html">common_<wbr>strings</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/hooks.html">hooks</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/path.html">path</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/state.html">state</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/trace.html">trace</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="modules/vanilla.html">vanilla</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="assets/js/search.js"><' + '/script>');</script>
</body>
</html>