diff --git a/docs/dgeni-package/index.js b/docs/dgeni-package/index.js
index db3c8c60ad..97dd7f6ce4 100644
--- a/docs/dgeni-package/index.js
+++ b/docs/dgeni-package/index.js
@@ -37,13 +37,16 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
// Register the processors
-.processor(require('./processors/generateDocsFromComments'))
-.processor(require('./processors/processModuleDocs'))
-.processor(require('./processors/processClassDocs'))
+.processor(require('./processors/captureModuleExports'))
+.processor(require('./processors/captureClassMembers'))
+.processor(require('./processors/captureModuleDocs'))
+.processor(require('./processors/attachModuleDocs'))
+.processor(require('./processors/cloneExportedFromDocs'))
.processor(require('./processors/generateNavigationDoc'))
.processor(require('./processors/extractTitleFromGuides'))
.processor(require('./processors/createOverviewDump'))
+
// Configure the log service
.config(function(log) {
log.level = 'warning';
@@ -63,6 +66,12 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
})
+.config(function(parseTagsProcessor, getInjectables) {
+ parseTagsProcessor.tagDefinitions.push(require('./tag-defs/public'));
+ parseTagsProcessor.tagDefinitions.push(require('./tag-defs/exportedAs'));
+})
+
+
// Configure file writing
.config(function(writeFilesProcessor) {
writeFilesProcessor.outputFolder = 'dist/docs';
@@ -90,10 +99,6 @@ module.exports = new Package('angular', [jsdocPackage, nunjucksPackage])
];
})
-// Add in a custom tag that we use when generating public docs
-.config(function(parseTagsProcessor) {
- parseTagsProcessor.tagDefinitions.push({ name: 'publicModule' });
-})
// Configure ids and paths
.config(function(computeIdsProcessor, computePathsProcessor, EXPORT_DOC_TYPES) {
diff --git a/docs/dgeni-package/processors/attachModuleDocs.js b/docs/dgeni-package/processors/attachModuleDocs.js
new file mode 100644
index 0000000000..8c0d960e17
--- /dev/null
+++ b/docs/dgeni-package/processors/attachModuleDocs.js
@@ -0,0 +1,22 @@
+var _ = require('lodash');
+
+module.exports = function attachModuleDocs(log) {
+
+ return {
+ $runAfter: ['tags-extracted'],
+ $runBefore: ['computing-ids'],
+ $process: function(docs) {
+ return _.filter(docs, function(doc) {
+ if (doc.docType !== 'moduleDoc') {
+ return true;
+ }
+ if (doc.module || doc.module === '') {
+ doc.moduleDoc.description = doc.description;
+ doc.moduleDoc.public = doc.public;
+ log.debug('attached', doc.moduleDoc.id, doc.moduleDoc.description);
+ }
+ return false;
+ });
+ }
+ };
+};
diff --git a/docs/dgeni-package/processors/processClassDocs.js b/docs/dgeni-package/processors/captureClassMembers.js
similarity index 92%
rename from docs/dgeni-package/processors/processClassDocs.js
rename to docs/dgeni-package/processors/captureClassMembers.js
index 71598d6693..ba280a21a7 100644
--- a/docs/dgeni-package/processors/processClassDocs.js
+++ b/docs/dgeni-package/processors/captureClassMembers.js
@@ -1,10 +1,10 @@
var _ = require('lodash');
-module.exports = function processClassDocs(log, getJSDocComment) {
+module.exports = function captureClassMembers(log, getJSDocComment) {
return {
- $runAfter: ['processModuleDocs'],
- $runBefore: ['parsing-tags', 'generateDocsFromComments'],
+ $runAfter: ['captureModuleExports'],
+ $runBefore: ['parsing-tags'],
ignorePrivateMembers: false,
$process: function(docs) {
var memberDocs = [];
diff --git a/docs/dgeni-package/processors/captureModuleDocs.js b/docs/dgeni-package/processors/captureModuleDocs.js
new file mode 100644
index 0000000000..8d3c9c9a4f
--- /dev/null
+++ b/docs/dgeni-package/processors/captureModuleDocs.js
@@ -0,0 +1,31 @@
+var _ = require('lodash');
+
+module.exports = function captureModuleDocs(log, getJSDocComment) {
+
+ return {
+ $runAfter: ['captureClassMembers'],
+ $runBefore: ['parsing-tags'],
+ $process: function(docs) {
+ // Generate docs for each module's file's comments not already captured
+ _.forEach(docs, function(moduleDoc) {
+
+ if ( moduleDoc.docType !== 'module' ) return;
+
+ moduleDoc.extraComments = [];
+ _.forEach(moduleDoc.comments, function(comment) {
+ var jsDocComment = getJSDocComment(comment);
+ if (jsDocComment) {
+ jsDocComment.docType = 'moduleDoc';
+ jsDocComment.moduleDoc = moduleDoc;
+ moduleDoc.extraComments.push(jsDocComment);
+ docs.push(jsDocComment);
+// console.log('found', jsDocComment.content);
+ }
+ });
+ if ( moduleDoc.extraComments.length > 0 ) {
+// console.log(moduleDoc.extraComments.length);
+ }
+ });
+ }
+ };
+};
\ No newline at end of file
diff --git a/docs/dgeni-package/processors/processModuleDocs.js b/docs/dgeni-package/processors/captureModuleExports.js
similarity index 80%
rename from docs/dgeni-package/processors/processModuleDocs.js
rename to docs/dgeni-package/processors/captureModuleExports.js
index 52db81b056..000912d540 100644
--- a/docs/dgeni-package/processors/processModuleDocs.js
+++ b/docs/dgeni-package/processors/captureModuleExports.js
@@ -1,12 +1,12 @@
var _ = require('lodash');
-module.exports = function processModuleDocs(log, ExportTreeVisitor, getJSDocComment) {
+module.exports = function captureModuleExports(log, ExportTreeVisitor, getJSDocComment) {
return {
$runAfter: ['files-read'],
- $runBefore: ['parsing-tags', 'generateDocsFromComments'],
+ $runBefore: ['parsing-tags'],
$process: function(docs) {
- var exportDocs = [];
+ var extraDocs = [];
_.forEach(docs, function(doc) {
if ( doc.docType === 'module' ) {
@@ -21,7 +21,7 @@ module.exports = function processModuleDocs(log, ExportTreeVisitor, getJSDocComm
_.forEach(visitor.exports, function(exportDoc) {
doc.exports.push(exportDoc);
- exportDocs.push(exportDoc);
+ extraDocs.push(exportDoc);
exportDoc.moduleDoc = doc;
if (exportDoc.comment) {
@@ -40,7 +40,7 @@ module.exports = function processModuleDocs(log, ExportTreeVisitor, getJSDocComm
}
});
- return docs.concat(exportDocs);
+ return docs.concat(extraDocs);
}
};
};
\ No newline at end of file
diff --git a/docs/dgeni-package/processors/cloneExportedFromDocs.js b/docs/dgeni-package/processors/cloneExportedFromDocs.js
new file mode 100644
index 0000000000..e647d7caa8
--- /dev/null
+++ b/docs/dgeni-package/processors/cloneExportedFromDocs.js
@@ -0,0 +1,37 @@
+var _ = require('lodash');
+
+module.exports = function cloneExportedFromDocs(modules, EXPORT_DOC_TYPES) {
+ return {
+ $runAfter: ['tags-parsed', 'attachModuleDocs'],
+ $runBefore: ['computing-ids'],
+ $process: function(docs) {
+
+ var extraPublicDocs = [];
+
+ _.forEach(docs, function(doc) {
+
+ if (EXPORT_DOC_TYPES.indexOf(doc.docType) === -1 || !doc.exportedAs) return;
+
+ _.forEach(doc.exportedAs, function(exportedAs) {
+ var exportedAsModule = modules[exportedAs];
+
+ if (!exportedAsModule) {
+ throw new Error('Missing module definition: "' + doc.exportedAs + '"\n' +
+ 'Referenced in "@exportedAs" tag on class: "' + doc.moduleDoc.id + '/' + doc.name + '"');
+ } else {
+
+ // Add a clone of export to its "exportedAs" module
+ var clonedDoc = _.clone(doc);
+ clonedDoc.moduleDoc = exportedAsModule;
+ exportedAsModule.exports.push(clonedDoc);
+ extraPublicDocs.push(clonedDoc);
+ }
+ });
+ });
+
+ docs = docs.concat(extraPublicDocs);
+
+ return docs;
+ }
+ };
+};
\ No newline at end of file
diff --git a/docs/dgeni-package/processors/createOverviewDump.js b/docs/dgeni-package/processors/createOverviewDump.js
index c0c1d60d08..0d72844bf5 100644
--- a/docs/dgeni-package/processors/createOverviewDump.js
+++ b/docs/dgeni-package/processors/createOverviewDump.js
@@ -3,7 +3,7 @@ var _ = require('lodash');
module.exports = function createOverviewDump() {
return {
- $runAfter: ['processModuleDocs', 'processClassDocs'],
+ $runAfter: ['captureModuleExports', 'captureClassMembers'],
$runBefore: ['docs-processed'],
$process: function(docs) {
var overviewDoc = {
diff --git a/docs/dgeni-package/processors/generateDocsFromComments.js b/docs/dgeni-package/processors/generateDocsFromComments.js
deleted file mode 100644
index 5d8b682c66..0000000000
--- a/docs/dgeni-package/processors/generateDocsFromComments.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var _ = require('lodash');
-
-module.exports = function generateDocsFromComments(log) {
- return {
- $runAfter: ['files-read'],
- $runBefore: ['parsing-tags'],
- $process: function(docs) {
- var commentDocs = [];
- docs = _.filter(docs, function(doc) {
- if (doc.docType !== 'atScriptFile') {
- return true;
- } else {
- _.forEach(doc.fileInfo.comments, function(comment) {
-
- // we need to check for `/**` at the start of the comment to find all the jsdoc style comments
- comment.range.toString().replace(/^\/\*\*([\w\W]*)\*\/$/g, function(match, commentBody) {
-
- // Create a doc from this comment
- commentDocs.push({
- fileInfo: doc.fileInfo,
- startingLine: comment.range.start.line,
- endingLine: comment.range.end.line,
- content: commentBody,
- codeTree: comment.treeAfter,
- docType: 'atScriptDoc'
- });
- });
- });
- }
- });
- return docs.concat(commentDocs);
- }
- };
-};
\ No newline at end of file
diff --git a/docs/dgeni-package/tag-defs/exportedAs.js b/docs/dgeni-package/tag-defs/exportedAs.js
new file mode 100644
index 0000000000..aa36151697
--- /dev/null
+++ b/docs/dgeni-package/tag-defs/exportedAs.js
@@ -0,0 +1,4 @@
+module.exports = {
+ name: 'exportedAs',
+ multi: true
+};
\ No newline at end of file
diff --git a/docs/dgeni-package/tag-defs/public.js b/docs/dgeni-package/tag-defs/public.js
new file mode 100644
index 0000000000..a85d5dd43c
--- /dev/null
+++ b/docs/dgeni-package/tag-defs/public.js
@@ -0,0 +1,4 @@
+module.exports = {
+ name: 'public',
+ transforms: function(doc, tag) { return true; }
+};
\ No newline at end of file
diff --git a/docs/dgeni-package/templates/overview-dump.template.html b/docs/dgeni-package/templates/overview-dump.template.html
index 52eaf8ca91..3f4ee1294f 100644
--- a/docs/dgeni-package/templates/overview-dump.template.html
+++ b/docs/dgeni-package/templates/overview-dump.template.html
@@ -23,7 +23,7 @@
{% for module in doc.modules %}
{$ module.id $}
- {%- if module.publicModule %} (public){% endif %}
+ {%- if module.public %} (public){% endif %}
{% for export in module.exports %}
{$ export.name $}
diff --git a/docs/public-docs-package/index.js b/docs/public-docs-package/index.js
index da001e7a1f..dbc3c9fcf1 100644
--- a/docs/public-docs-package/index.js
+++ b/docs/public-docs-package/index.js
@@ -6,12 +6,11 @@ module.exports = new Package('angular-public', [basePackage])
.processor(require('./processors/filterPublicDocs'))
-.config(function(processClassDocs, filterPublicDocs, EXPORT_DOC_TYPES) {
- processClassDocs.ignorePrivateMembers = true;
- filterPublicDocs.docTypes = EXPORT_DOC_TYPES;
+.config(function(captureClassMembers) {
+ captureClassMembers.ignorePrivateMembers = true;
})
// Configure file writing
.config(function(writeFilesProcessor) {
writeFilesProcessor.outputFolder = 'dist/public_docs';
-});
+});
\ No newline at end of file
diff --git a/docs/public-docs-package/processors/filterPublicDocs.js b/docs/public-docs-package/processors/filterPublicDocs.js
index 4190f2e740..8d290f0e36 100644
--- a/docs/public-docs-package/processors/filterPublicDocs.js
+++ b/docs/public-docs-package/processors/filterPublicDocs.js
@@ -1,63 +1,28 @@
var _ = require('lodash');
-module.exports = function filterPublicDocs(modules) {
+module.exports = function filterPublicDocs(modules, EXPORT_DOC_TYPES) {
return {
- $runAfter: ['tags-parsed'],
+ $runAfter: ['tags-parsed', 'cloneExportedFromDocs'],
$runBefore: ['computing-ids'],
- docTypes: [],
- $validate: {
- docTypes: { presence: true }
- },
$process: function(docs) {
- var extraPublicDocs = [];
- docTypes = this.docTypes;
-
- _.forEach(docs, function(doc) {
-
- if (docTypes.indexOf(doc.docType) === -1 || !doc.publicModule) return;
-
- var publicModule = modules[doc.publicModule];
-
- if (!publicModule) {
- throw new Error('Missing module definition: "' + doc.publicModule + '"\n' +
- 'Referenced in class: "' + doc.moduleDoc.id + '/' + doc.name + '"');
- } else {
-
- // Ensure module is marked as public
- publicModule.isPublic = true;
-
- // Add a clone of export to its "public" module
- var publicDoc = _.clone(doc);
- publicDoc.moduleDoc = publicModule;
- publicModule.exports.push(publicDoc);
- extraPublicDocs.push(publicDoc);
- }
- });
-
// Filter out the documents that are not public
- docs = _.filter(docs, function(doc) {
+ return _.filter(docs, function(doc) {
if (doc.docType === 'module') {
// doc is a module - is it public?
- return doc.isPublic;
+ return doc.public;
}
- if (docTypes.indexOf(doc.docType) === -1) {
+ if (EXPORT_DOC_TYPES.indexOf(doc.docType) === -1) {
// doc is not a type we care about
return true;
}
// doc is in a public module
- return doc.moduleDoc && doc.moduleDoc.isPublic;
+ return doc.moduleDoc && doc.moduleDoc.public;
});
-
- docs = docs.concat(extraPublicDocs);
-
- return docs;
}
};
-
-
};
\ No newline at end of file
diff --git a/modules/angular2/angular2.js b/modules/angular2/angular2.js
index afc531b739..86a7965ec7 100644
--- a/modules/angular2/angular2.js
+++ b/modules/angular2/angular2.js
@@ -1,8 +1,12 @@
/**
+ * @module
+ * @public
+ * @description
* Define public API for Angular here.
*/
export * from './change_detection';
export * from './core';
export * from './annotations';
+export * from './template';
export * from './directives';
export * from './forms';
diff --git a/modules/angular2/annotations.js b/modules/angular2/annotations.js
index d95c56a360..6673bcdd6b 100644
--- a/modules/angular2/annotations.js
+++ b/modules/angular2/annotations.js
@@ -1,4 +1,7 @@
/**
+ * @module
+ * @public
+ * @description
* Define public API for Angular here.
*/
export * from './src/core/annotations/annotations';
diff --git a/modules/angular2/change_detection.js b/modules/angular2/change_detection.js
index a6ff92d713..c4a89eb72b 100644
--- a/modules/angular2/change_detection.js
+++ b/modules/angular2/change_detection.js
@@ -1,3 +1,10 @@
+/**
+ * @module
+ * @public
+ * @description
+ * Description of the change_detection module
+ */
+
export {
ASTWithSource, AST, AstTransformer, AccessMember, LiteralArray, ImplicitReceiver
} from './src/change_detection/parser/ast';
@@ -45,7 +52,7 @@ export var defaultPipes = {
/**
- * @publicModule angular2/change_detection
+ * @exportedAs angular2/change_detection
*/
export class DynamicChangeDetection extends ChangeDetection {
registry:PipeRegistry;
@@ -61,7 +68,7 @@ export class DynamicChangeDetection extends ChangeDetection {
}
/**
- * @publicModule angular2/change_detection
+ * @exportedAs angular2/change_detection
*/
export class JitChangeDetection extends ChangeDetection {
registry:PipeRegistry;
diff --git a/modules/angular2/di.js b/modules/angular2/di.js
index f54eb8cace..89ebdc5aea 100644
--- a/modules/angular2/di.js
+++ b/modules/angular2/di.js
@@ -1,3 +1,9 @@
+/**
+ * @module
+ * @description
+ * This is a description
+ */
+
export {Inject, InjectPromise, InjectLazy, Injectable, Optional, DependencyAnnotation} from './src/di/annotations';
export {Injector} from './src/di/injector';
export {Binding, Dependency, bind} from './src/di/binding';
diff --git a/modules/angular2/directives.js b/modules/angular2/directives.js
index 54d259c559..29ed4027c5 100644
--- a/modules/angular2/directives.js
+++ b/modules/angular2/directives.js
@@ -1,3 +1,10 @@
+/**
+ * @module
+ * @public
+ * @description
+ * Describe the directives module here
+ */
+
export * from './src/directives/class';
export * from './src/directives/for';
export * from './src/directives/if';
diff --git a/modules/angular2/forms.js b/modules/angular2/forms.js
index 40f02caae1..80309a3789 100644
--- a/modules/angular2/forms.js
+++ b/modules/angular2/forms.js
@@ -1,3 +1,10 @@
+/**
+ * @module
+ * @public
+ * @description
+ * Describe the forms module here
+ */
+
export * from './src/forms/model';
export * from './src/forms/directives';
export * from './src/forms/validators';
diff --git a/modules/angular2/pipes.js b/modules/angular2/pipes.js
index 1f650590e0..6492c1f35c 100644
--- a/modules/angular2/pipes.js
+++ b/modules/angular2/pipes.js
@@ -1,3 +1,6 @@
/**
+ * @module
+ * @public
+ * @description
* Define public API for Angular here.
*/
diff --git a/modules/angular2/src/change_detection/binding_propagation_config.js b/modules/angular2/src/change_detection/binding_propagation_config.js
index 282b31d279..66730d19d4 100644
--- a/modules/angular2/src/change_detection/binding_propagation_config.js
+++ b/modules/angular2/src/change_detection/binding_propagation_config.js
@@ -2,7 +2,7 @@ import {ChangeDetector} from './interfaces';
import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
/**
- * @publicModule angular2/change_detection
+ * @exportedAs angular2/change_detection
*/
export class BindingPropagationConfig {
_cd:ChangeDetector;
diff --git a/modules/angular2/src/change_detection/pipes/iterable_changes.js b/modules/angular2/src/change_detection/pipes/iterable_changes.js
index 8df99e7bf7..4ab8bf0110 100644
--- a/modules/angular2/src/change_detection/pipes/iterable_changes.js
+++ b/modules/angular2/src/change_detection/pipes/iterable_changes.js
@@ -27,7 +27,7 @@ export class IterableChangesFactory {
}
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class IterableChanges extends Pipe {
_collection;
@@ -505,7 +505,7 @@ export class IterableChanges extends Pipe {
}
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class CollectionChangeRecord {
currentIndex:int;
diff --git a/modules/angular2/src/change_detection/pipes/keyvalue_changes.js b/modules/angular2/src/change_detection/pipes/keyvalue_changes.js
index f3b2739d89..155dd21ab5 100644
--- a/modules/angular2/src/change_detection/pipes/keyvalue_changes.js
+++ b/modules/angular2/src/change_detection/pipes/keyvalue_changes.js
@@ -4,7 +4,7 @@ import {stringify, looseIdentical, isJsObject} from 'angular2/src/facade/lang';
import {NO_CHANGE, Pipe} from './pipe';
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class KeyValueChangesFactory {
supports(obj):boolean {
@@ -17,7 +17,7 @@ export class KeyValueChangesFactory {
}
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class KeyValueChanges extends Pipe {
_records:Map;
@@ -356,7 +356,7 @@ export class KeyValueChanges extends Pipe {
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class KVChangeRecord {
key;
diff --git a/modules/angular2/src/change_detection/pipes/null_pipe.js b/modules/angular2/src/change_detection/pipes/null_pipe.js
index 9c51fea64e..de6728ebad 100644
--- a/modules/angular2/src/change_detection/pipes/null_pipe.js
+++ b/modules/angular2/src/change_detection/pipes/null_pipe.js
@@ -2,7 +2,7 @@ import {isBlank} from 'angular2/src/facade/lang';
import {Pipe, NO_CHANGE} from './pipe';
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class NullPipeFactory {
supports(obj):boolean {
@@ -15,7 +15,7 @@ export class NullPipeFactory {
}
/**
- * @publicModule angular2/pipes
+ * @exportedAs angular2/pipes
*/
export class NullPipe extends Pipe {
called:boolean;
diff --git a/modules/angular2/src/change_detection/pipes/pipe.js b/modules/angular2/src/change_detection/pipes/pipe.js
index af0a62134d..da3f189319 100644
--- a/modules/angular2/src/change_detection/pipes/pipe.js
+++ b/modules/angular2/src/change_detection/pipes/pipe.js
@@ -1,7 +1,7 @@
export var NO_CHANGE = new Object();
/**
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
export class Pipe {
supports(obj):boolean {return false;}
diff --git a/modules/angular2/src/core/annotations/annotations.js b/modules/angular2/src/core/annotations/annotations.js
index d48fe35bc6..c2a32d038b 100644
--- a/modules/angular2/src/core/annotations/annotations.js
+++ b/modules/angular2/src/core/annotations/annotations.js
@@ -232,7 +232,7 @@ import {Injectable} from 'angular2/di';
* This directive would be instantiated with a `Dependency` directive found on the current element. If none can be
* found, the injector supplies `null` instead of throwing an error.
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
@ABSTRACT()
export class Directive extends Injectable {
@@ -478,7 +478,7 @@ export class Directive extends Injectable {
* }
* ```
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class Component extends Directive {
/**
@@ -614,7 +614,7 @@ export class Component extends Directive {
*
*
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class DynamicComponent extends Directive {
/**
@@ -706,7 +706,7 @@ export class DynamicComponent extends Directive {
*
* ```
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class Decorator extends Directive {
@@ -832,7 +832,7 @@ export class Decorator extends Directive {
* view occurs on the second `` which is a sibling to the `` element.
*
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class Viewport extends Directive {
@CONST()
@@ -874,7 +874,7 @@ export class Viewport extends Directive {
* }
* }
* ```
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export const onDestroy = "onDestroy";
@@ -912,7 +912,7 @@ export const onDestroy = "onDestroy";
* }
* }
* ```
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export const onChange = "onChange";
@@ -933,6 +933,6 @@ export const onChange = "onChange";
*
* }
* ```
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export const onAllChangesDone = "onAllChangesDone";
diff --git a/modules/angular2/src/core/annotations/view.js b/modules/angular2/src/core/annotations/view.js
index 4da9c3c575..b42f7eed77 100644
--- a/modules/angular2/src/core/annotations/view.js
+++ b/modules/angular2/src/core/annotations/view.js
@@ -29,7 +29,7 @@ import {ABSTRACT, CONST, Type} from 'angular2/src/facade/lang';
* }
* ```
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class View {
templateUrl:any; //string;
diff --git a/modules/angular2/src/core/annotations/visibility.js b/modules/angular2/src/core/annotations/visibility.js
index 4faa2bf544..e102fef1f4 100644
--- a/modules/angular2/src/core/annotations/visibility.js
+++ b/modules/angular2/src/core/annotations/visibility.js
@@ -40,7 +40,7 @@ import {DependencyAnnotation} from 'angular2/di';
* The `@Parent()` annotation in our constructor forces the injector to retrieve the dependency from the
* parent element (even thought the current element could resolve it): Angular injects `dependency=1`.
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class Parent extends DependencyAnnotation {
@CONST()
@@ -101,7 +101,7 @@ export class Parent extends DependencyAnnotation {
*
* Angular injects `dependency=2`.
*
- * @publicModule angular2/annotations
+ * @exportedAs angular2/annotations
*/
export class Ancestor extends DependencyAnnotation {
@CONST()
diff --git a/modules/angular2/src/core/application.js b/modules/angular2/src/core/application.js
index 8e3bae15c7..4036748a50 100644
--- a/modules/angular2/src/core/application.js
+++ b/modules/angular2/src/core/application.js
@@ -240,7 +240,7 @@ function _createVmZone(givenReporter:Function): VmTurnZone {
*
* Returns a [Promise] with the application`s private [Injector].
*
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
export function bootstrap(appComponentType: Type,
componentInjectableBindings: List = null,
diff --git a/modules/angular2/src/core/compiler/interfaces.js b/modules/angular2/src/core/compiler/interfaces.js
index 3623a7a773..d7deb19cec 100644
--- a/modules/angular2/src/core/compiler/interfaces.js
+++ b/modules/angular2/src/core/compiler/interfaces.js
@@ -1,5 +1,5 @@
/**
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
export class OnChange {
onChange(changes) {
diff --git a/modules/angular2/src/core/compiler/ng_element.js b/modules/angular2/src/core/compiler/ng_element.js
index 66ac23eb8f..5c8f6d3e86 100644
--- a/modules/angular2/src/core/compiler/ng_element.js
+++ b/modules/angular2/src/core/compiler/ng_element.js
@@ -9,7 +9,7 @@ import {DirectDomViewRef} from 'angular2/src/render/dom/direct_dom_renderer';
* Attention: NgElement will be replaced by a different concept
* for accessing an element in a way that is compatible with the render layer.
*
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
export class NgElement {
_view:viewModule.AppView;
diff --git a/modules/angular2/src/core/compiler/view.js b/modules/angular2/src/core/compiler/view.js
index 00bf6acde2..12aa74d522 100644
--- a/modules/angular2/src/core/compiler/view.js
+++ b/modules/angular2/src/core/compiler/view.js
@@ -13,7 +13,7 @@ import * as renderApi from 'angular2/src/render/api';
/**
* Const of making objects: http://jsperf.com/instantiate-size-of-object
*
- * @publicModule angular2/template
+ * @exportedAs angular2/template
*/
@IMPLEMENTS(ChangeDispatcher)
// TODO(tbosch): this is not supported in dart2js (no '.' is allowed)
@@ -288,7 +288,7 @@ export class AppView {
/**
*
- * @publicModule angular2/template
+ * @exportedAs angular2/template
*/
export class AppProtoView {
elementBinders:List;
diff --git a/modules/angular2/src/core/compiler/view_container.js b/modules/angular2/src/core/compiler/view_container.js
index 01703cf66a..61afb5ad7d 100644
--- a/modules/angular2/src/core/compiler/view_container.js
+++ b/modules/angular2/src/core/compiler/view_container.js
@@ -9,7 +9,7 @@ import * as viewModule from './view';
import * as vfModule from './view_factory';
/**
- * @publicModule angular2/template
+ * @exportedAs angular2/template
*/
export class ViewContainer {
render:renderApi.ViewContainerRef;
diff --git a/modules/angular2/src/core/exception_handler.js b/modules/angular2/src/core/exception_handler.js
index 30773b06a5..1d74b28b17 100644
--- a/modules/angular2/src/core/exception_handler.js
+++ b/modules/angular2/src/core/exception_handler.js
@@ -3,7 +3,7 @@ import {isPresent, print} from 'angular2/src/facade/lang';
import {ListWrapper, isListLikeIterable} from 'angular2/src/facade/collection';
/**
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
@Injectable()
export class ExceptionHandler {
diff --git a/modules/angular2/src/core/life_cycle/life_cycle.js b/modules/angular2/src/core/life_cycle/life_cycle.js
index 75e07c8a38..91b508b227 100644
--- a/modules/angular2/src/core/life_cycle/life_cycle.js
+++ b/modules/angular2/src/core/life_cycle/life_cycle.js
@@ -5,7 +5,7 @@ import {ExceptionHandler} from 'angular2/src/core/exception_handler';
import {isPresent} from 'angular2/src/facade/lang';
/**
- * @publicModule angular2/change_detection
+ * @exportedAs angular2/change_detection
*/
@Injectable()
export class LifeCycle {
diff --git a/modules/angular2/src/directives/for.js b/modules/angular2/src/directives/for.js
index 0da0dc23a7..c30d07d056 100644
--- a/modules/angular2/src/directives/for.js
+++ b/modules/angular2/src/directives/for.js
@@ -34,7 +34,7 @@ import {ListWrapper} from 'angular2/src/facade/collection';
* - `...`
* - `...`
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Viewport({
selector: '[for][of]',
diff --git a/modules/angular2/src/directives/if.js b/modules/angular2/src/directives/if.js
index 39acfff7c5..0bfdeabfac 100644
--- a/modules/angular2/src/directives/if.js
+++ b/modules/angular2/src/directives/if.js
@@ -22,7 +22,7 @@ import {isBlank} from 'angular2/src/facade/lang';
* - `...
`
* - `...
`
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Viewport({
selector: '[if]',
diff --git a/modules/angular2/src/directives/non_bindable.js b/modules/angular2/src/directives/non_bindable.js
index b4858b31eb..5459d3cc3b 100644
--- a/modules/angular2/src/directives/non_bindable.js
+++ b/modules/angular2/src/directives/non_bindable.js
@@ -13,7 +13,7 @@ import {Decorator} from 'angular2/src/core/annotations/annotations';
* Ignored: {{1 + 2}}
// output "Ignored: {{1 + 2}}"
* ```
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Decorator({
selector: '[non-bindable]',
diff --git a/modules/angular2/src/directives/switch.js b/modules/angular2/src/directives/switch.js
index 96f11a90e6..dc1ed4544f 100644
--- a/modules/angular2/src/directives/switch.js
+++ b/modules/angular2/src/directives/switch.js
@@ -29,7 +29,7 @@ import {Parent} from 'angular2/src/core/annotations/visibility';
*
* ```
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Decorator({
selector: '[switch]',
@@ -142,7 +142,7 @@ export class Switch {
* ...
* ```
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Viewport({
selector: '[switch-when]',
@@ -179,10 +179,10 @@ export class SwitchWhen {
* ```
* ...
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
* ```
*
- * @publicModule angular2/directives
+ * @exportedAs angular2/directives
*/
@Viewport({
selector: '[switch-default]'
diff --git a/modules/angular2/src/forms/directives.js b/modules/angular2/src/forms/directives.js
index b8c18850b3..e1e63b77cc 100644
--- a/modules/angular2/src/forms/directives.js
+++ b/modules/angular2/src/forms/directives.js
@@ -11,7 +11,7 @@ import {Validators} from './validators';
//}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
@Decorator({
selector: '[control]',
@@ -35,7 +35,7 @@ export class DefaultValueAccessor {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
@Decorator({
selector: 'input[type=checkbox][control]',
@@ -59,7 +59,7 @@ export class CheckboxControlValueAccessor {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
@Decorator({
lifecycle: [onChange],
@@ -119,7 +119,7 @@ export class ControlDirective {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
@Decorator({
selector: '[control-group]',
@@ -170,7 +170,7 @@ export class ControlGroupDirective {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
// todo(misko): rename to lover case as it is not a Type but a var.
export var FormDirectives = [
diff --git a/modules/angular2/src/forms/form_builder.js b/modules/angular2/src/forms/form_builder.js
index 239d5e3810..fa83a9a0de 100644
--- a/modules/angular2/src/forms/form_builder.js
+++ b/modules/angular2/src/forms/form_builder.js
@@ -4,7 +4,7 @@ import * as modelModule from './model';
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class FormBuilder {
group(controlsConfig, extra = null):modelModule.ControlGroup {
diff --git a/modules/angular2/src/forms/model.js b/modules/angular2/src/forms/model.js
index 824ee2503d..c14120c458 100644
--- a/modules/angular2/src/forms/model.js
+++ b/modules/angular2/src/forms/model.js
@@ -4,12 +4,12 @@ import {StringMap, StringMapWrapper, ListWrapper, List} from 'angular2/src/facad
import {Validators} from './validators';
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export const VALID = "VALID";
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export const INVALID = "INVALID";
@@ -26,7 +26,7 @@ export const INVALID = "INVALID";
//}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class AbstractControl {
_value:any;
@@ -80,7 +80,7 @@ export class AbstractControl {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class Control extends AbstractControl {
constructor(value:any, validator:Function = Validators.nullValidator) {
@@ -108,7 +108,7 @@ export class Control extends AbstractControl {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class ControlGroup extends AbstractControl {
controls:StringMap;
@@ -186,7 +186,7 @@ export class ControlGroup extends AbstractControl {
}
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class ControlArray extends AbstractControl {
controls:List;
diff --git a/modules/angular2/src/forms/validators.js b/modules/angular2/src/forms/validators.js
index 4ec90c3484..39dd6e8cc3 100644
--- a/modules/angular2/src/forms/validators.js
+++ b/modules/angular2/src/forms/validators.js
@@ -4,7 +4,7 @@ import {List, ListWrapper, StringMapWrapper} from 'angular2/src/facade/collectio
import * as modelModule from './model';
/**
- * @publicModule angular2/forms
+ * @exportedAs angular2/forms
*/
export class Validators {
static required(c:modelModule.Control) {
diff --git a/modules/angular2/src/render/dom/compiler/template_loader.js b/modules/angular2/src/render/dom/compiler/template_loader.js
index eba7247877..350361205f 100644
--- a/modules/angular2/src/render/dom/compiler/template_loader.js
+++ b/modules/angular2/src/render/dom/compiler/template_loader.js
@@ -11,7 +11,7 @@ import {UrlResolver} from 'angular2/src/services/url_resolver';
/**
* Strategy to load component templates.
- * @publicModule angular2/angular2
+ * @exportedAs angular2/angular2
*/
@Injectable()
export class TemplateLoader {
diff --git a/modules/angular2/src/test_lib/test_injector.js b/modules/angular2/src/test_lib/test_injector.js
index 6befc78f5f..01dd910700 100644
--- a/modules/angular2/src/test_lib/test_injector.js
+++ b/modules/angular2/src/test_lib/test_injector.js
@@ -46,7 +46,7 @@ import * as rvf from 'angular2/src/render/dom/view/view_factory';
*
* This must be kept in sync with the _rootBindings in application.js
*
- * @returns {*[]}
+ * @returns {any[]}
*/
function _getRootBindings() {
return [
@@ -59,7 +59,7 @@ function _getRootBindings() {
*
* This must be kept in sync with _injectorBindings() in application.js
*
- * @returns {*[]}
+ * @returns {any[]}
*/
function _getAppBindings() {
var appDoc;
diff --git a/modules/angular2/template.js b/modules/angular2/template.js
new file mode 100644
index 0000000000..6492c1f35c
--- /dev/null
+++ b/modules/angular2/template.js
@@ -0,0 +1,6 @@
+/**
+ * @module
+ * @public
+ * @description
+ * Define public API for Angular here.
+ */
diff --git a/modules/angular2/view.js b/modules/angular2/view.js
index 1f650590e0..6492c1f35c 100644
--- a/modules/angular2/view.js
+++ b/modules/angular2/view.js
@@ -1,3 +1,6 @@
/**
+ * @module
+ * @public
+ * @description
* Define public API for Angular here.
*/