Skip to content

Commit 557c3db

Browse files
docs: tweak UIRouter docs a bit
1 parent ac278e3 commit 557c3db

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/router.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,22 @@ const locationConfigStub = makeStub<LocationConfig>('LocationConfig', locCfgFns)
2929
* An instance of UI-Router.
3030
*
3131
* This object contains references to service APIs which define your application's routing behavior.
32-
*
33-
* At a minimum, you should use the [[UIRouter.stateRegistry]] API to register application states (routes).
3432
*/
3533
export class UIRouter {
3634
/** @internal */ $id = _routerInstance++;
3735
/** @internal */ _disposed = false;
3836
/** @internal */ private _disposables: Disposable[] = [];
3937

40-
/** Provides trace information to the console */
38+
/** Enable/disable tracing to the javascript console */
4139
trace: Trace = trace;
4240

4341
/** Provides services related to ui-view synchronization */
4442
viewService = new ViewService(this);
4543

46-
/** Global router state */
44+
/** An object that contains global router state, such as the current state and params */
4745
globals: UIRouterGlobals = new UIRouterGlobals();
4846

49-
/** Provides services related to Transitions */
47+
/** A service that exposes global Transition Hooks */
5048
transitionService: TransitionService = new TransitionService(this);
5149

5250
/**
@@ -86,6 +84,7 @@ export class UIRouter {
8684
*
8785
* Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.
8886
*
87+
* @internal
8988
* @param disposable (optional) the disposable to dispose
9089
*/
9190
dispose(disposable?: any): void {
@@ -194,15 +193,16 @@ export class UIRouter {
194193
}
195194

196195
/**
197-
* Returns registered plugins
198-
*
199-
* Returns the registered plugin of the given `pluginName`.
200-
* If no `pluginName` is given, returns all registered plugins
196+
* Returns a plugin registered with the given `pluginName`.
201197
*
202-
* @param pluginName (optional) the name of the plugin to get
203-
* @return the named plugin (undefined if not found), or all plugins (if `pluginName` is omitted)
198+
* @param pluginName the name of the plugin to get
199+
* @return the plugin, or undefined
204200
*/
205201
getPlugin(pluginName: string): UIRouterPlugin;
202+
/**
203+
* Returns all registered plugins
204+
* @return all registered plugins
205+
*/
206206
getPlugin(): UIRouterPlugin[];
207207
getPlugin(pluginName?: string): UIRouterPlugin | UIRouterPlugin[] {
208208
return pluginName ? this._plugins[pluginName] : values(this._plugins);

0 commit comments

Comments
 (0)