Skip to content

Commit 2159415

Browse files
docs(*): categorize new files into modules
1 parent 3d3c50f commit 2159415

15 files changed

+21
-7
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = function (grunt) {
180180

181181
grunt.registerTask('docs', 'Generate documentation to _doc', function() {
182182
promising(this,
183-
system('./node_modules/typedoc/bin/typedoc --readme ./README.md --name "UI-Router" --theme ./typedoctheme --mode modules --module commonjs --target es5 --out _doc src/params src/path src/resolve src/state src/transition src/url src/view src/ng1')
183+
system('./node_modules/typedoc/bin/typedoc --experimentalDecorators --readme ./README.md --name "UI-Router" --theme ./typedoctheme --mode modules --module commonjs --target es5 --out _doc src')
184184
);
185185
});
186186

src/common/predicates.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** Predicates @module common */
1+
/** Predicates @module common */ /** */
22
import {and, not, pipe, prop} from "./hof";
33

44
const toStr = Object.prototype.toString;

src/core.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference path='../typings/angularjs/angular.d.ts' />
22
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
3+
/** @module core */ /** */
34

45
import * as common from "./common/module";
56
import * as params from "./params/module";

src/justjs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Naive, pure JS implementation of core ui-router services
3+
*
4+
* @module justjs
5+
*/ /** */
16
export * from "./core";
27
import {services} from "./common/coreservices";
38
import {isDefined, isFunction, isArray, isObject, isInjectable} from "./common/predicates";

src/ng1.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
33
/**
44
* Main entry point for angular 1.x build
5+
* @module ng1
56
*/
67
/** for typedoc */
78

src/ng1/services.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* - Provides an implementation for the [[CoreServices]] API, based on angular 1 services.
55
* - Also registers some services with the angular 1 injector.
6-
* - Creates and bootstraps a new [[Router]] object, usiong the angular 1 lifecycle
6+
* - Creates and bootstraps a new [[UIRouter]] object. Ties it to the the angular 1 lifecycle.
77
*
88
* @module ng1
99
* @preferred
@@ -24,6 +24,7 @@ import {State} from "../state/module";
2424
import {trace} from "../common/trace";
2525
import {ng1ViewsBuilder, ng1ViewConfigFactory, Ng1ViewConfig} from "./viewsBuilder";
2626

27+
/** @hidden */
2728
let app = angular.module("ui.router.angular1", []);
2829

2930
/**

src/ng1/stateEvents.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* angular.module("myApplication", ['ui.router', 'ui.router.state.events']
1515
* ```
1616
*
17-
* @module ng1_state_events
17+
* @module ng1/state_events
1818
*/
1919

2020
/** for typedoc */

src/ng1/viewScroll.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @module view */ /** for typedoc */
1+
/** @module ng1 */ /** */
22
import {IServiceProviderFactory} from "angular";
33

44
/**

src/ng2.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// <reference path='../typings/es6-shim/es6-shim.d.ts' />
22
/**
33
* Main entry point for angular 2.x build
4+
* @module ng2
45
*/
56
/** for typedoc */
67

src/ng2/uiSref.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @module ng2 */ /** */
12
import {UIRouter} from "../router";
23
import {Directive} from "angular2/core";
34
import {Optional} from "angular2/core";

src/ng2/uiSrefActive.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @module ng2 */ /** */
12
import {UIRouter} from "../router";
23
import {Directive} from "angular2/core";
34
import {UiSref} from "./uiSref";

src/ng2/viewsBuilder.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @module ng2 */ /** */
12
import {State} from "../state/stateObject";
23
import {pick, forEach} from "../common/common";
34

src/router.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @module common */ /** */
12
import {UrlMatcherFactory} from "./url/urlMatcherFactory";
23
import {UrlRouterProvider} from "./url/urlRouter";
34
import {StateProvider} from "./state/state";

src/state/hooks/resolveHooks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export class ResolveHooks {
3636
let node = find(<any[]> treeChanges.entering, propEq('state', $state$));
3737

3838
// A new Resolvable contains all the resolved data in this context as a single object, for injection as `$resolve$`
39-
let $resolve$ = new Resolvable("$resolve$", () => map(context.getResolvables(), (r: Resolvable) => r.data));
4039
let context = node.resolveContext;
40+
let $resolve$ = new Resolvable("$resolve$", () => map(context.getResolvables(), (r: Resolvable) => r.data));
4141
var options = extend({transition: $transition$}, { resolvePolicy: LAZY });
4242

4343
// Resolve all the LAZY resolves, then resolve the `$resolve$` object, then add `$resolve$` to the context

src/state/stateService.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** @module state */ /** */
12
import {extend, defaults } from "../common/common";
23
import {isDefined, isObject, isString} from "../common/predicates";
34
import {Queue} from "../common/queue";
@@ -474,7 +475,7 @@ export class StateService {
474475
*/
475476
get(): StateDeclaration[];
476477
get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;
477-
get(stateOrName?: StateOrName, base?: StateOrName): (StateDeclaration|StateDeclaration[]) {
478+
get(stateOrName?: StateOrName, base?: StateOrName): any {
478479
if (arguments.length === 0) return this.stateRegistry.get();
479480
return this.stateRegistry.get(stateOrName, base || this.$current);
480481
}

0 commit comments

Comments
 (0)