Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report (I think)

Current behavior

The AoT compiler is processing and creating .ngfactory.ts files in @angular/material when I use platformBrowser().bootstrapModuleFactory. I have to include this directory in rootDirs for compilation to succeed.

Expected behavior

I may be wrong here, but I expected only my own project components, styles and templates to be processed.

Minimal reproduction of the problem with instructions

In fact, the AoT compiler will fail if it doesn't have access to Material files. For instance, if I edit tsconfig.json and change:

"rootDirs":["./dev","./node_modules/@angular/material"]

to:

"rootDirs":["./dev"],

I get 20 or 30 errors of this kind during compilation:

Error File 'C:/.../node_modules/@angular/material/button-toggle/button-toggle.ngfactory.ts' is not under 'rootDir'

If I include Material dir in rootDirs, after compilation, the resulting directory structure (in output folder) is badly structured. See details here along with tsconfig.

Even if I include the @angular/material dir in rootDirs and allow the compilation to run (it completes without error), the app fails in the browser with 404 not found when trying to load files such as:

/@angular/core/bundles/core.umd.js/src/linker/ng_module_factory.js

/@angular/common/bundles/common.umd.js/src/common_module.js

...

Here are some suspicious-looking imports in app.module.ngfactory.ts

import * as import87 from '../../node_modules/@angular/material/dialog/dialog-container.ngfactory';

import * as import90 from '../../node_modules/@angular/material/tooltip/tooltip.ngfactory';

What is the motivation / use case for changing the behavior?

To get AoT to work

Please tell us about your environment:

Windows 7, PhpStorm.

Angular version: 2.0.1

Language: TypeScript 2.0.1

Node (for AoT issues): node --version = 4.5.0

Issue 2:
cc @naomiblack

TODO:

Fix broken links in annotations.ts: PR #2475

Fix checkAnchorLinks service in Dgeni to url decode normalized urls when checking dangling links: angular/dgeni-packages#119

Update dgeni-packages dependency PR #2489

Fix document names/ids to not include full heritage of classes: #2462

Merge #2499 to get rid of Ambiguous Link warnings caused by #2486

Opening an issue to track work to fix errors when running the gulp public_docs task. @petebacondarwin tells me time is better spent addressing these issues than the ones generated by the gulp docs task. Based on current master (ddd5a23), here are the warnings logged when running gulp public_docs:

warn: Invalid link (does not match any doc): "QueryList" - doc "DirectiveAnnotation extends Injectable" (class) - from file "angular2/src/core/annotations_impl/annotations.ts"
warn: Invalid link (does not match any doc): "QueryList" - doc "DirectiveAnnotation extends Injectable" (class) - from file "angular2/src/core/annotations_impl/annotations.ts"
warn: Invalid link (does not match any doc): "DynamicChangeDetection" - doc "ChangeDetection" (class) - from file "angular2/src/change_detection/interfaces.ts"
warn: Invalid link (does not match any doc): "JitChangeDetection" - doc "ChangeDetection" (class) - from file "angular2/src/change_detection/interfaces.ts"
warn: Invalid link (does not match any doc): "DynamicChangeDetection" - doc "ChangeDetection" (class) - from file "angular2/src/change_detection/interfaces.ts"
warn: Invalid link (does not match any doc): "JitChangeDetection" - doc "ChangeDetection" (class) - from file "angular2/src/change_detection/interfaces.ts"
warn: Invalid link (does not match any doc): "JitChangeDetection" - doc "DynamicChangeDetection extends ChangeDetection" (class) - from file "angular2/src/change_detection/change_detection.ts"
warn: Invalid link (does not match any doc): "DynamicChangeDetection" - doc "JitChangeDetection extends ChangeDetection" (class) - from file "angular2/src/change_detection/change_detection.ts"
warn: Invalid link (does not match any doc): "QueryList" - doc "QueryAnnotation extends DependencyAnnotation" (class) - from file "angular2/src/core/annotations_impl/di.ts"
warn: Invalid link (does not match any doc): "QueryList" - doc "QueryAnnotation extends DependencyAnnotation" (class) - from file "angular2/src/core/annotations_impl/di.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "angular2/forms" (module) - from file "angular2/forms.ts"
warn: Invalid link (does not match any doc): "Control" - doc "angular2/forms" (module) - from file "angular2/forms.ts"
warn: Invalid link (does not match any doc): "Control" - doc "angular2/forms" (module) - from file "angular2/forms.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "Control extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "ControlArray" - doc "Control extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "Control" - doc "ControlGroup extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "Control" - doc "ControlGroup extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "ControlArray" - doc "ControlGroup extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "ControlArray" - doc "ControlGroup extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "Control" - doc "ControlArray extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "Control" - doc "ControlArray extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "ControlArray extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "ControlArray extends AbstractControl" (class) - from file "angular2/src/forms/model.ts"
warn: Invalid link (does not match any doc): "Control" - doc "DefaultValueAccessor implements ControlValueAccessor" (class) - from file "angular2/src/forms/directives/default_value_accessor.ts"
warn: Invalid link (does not match any doc): "Control" - doc "SelectControlValueAccessor implements ControlValueAccessor" (class) - from file "angular2/src/forms/directives/select_control_value_acces
sor.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "FormBuilder" (class) - from file "angular2/src/forms/form_builder.ts"
warn: Invalid link (does not match any doc): "Control" - doc "FormBuilder" (class) - from file "angular2/src/forms/form_builder.ts"
warn: Invalid link (does not match any doc): "ControlGroup" - doc "FormBuilder" (class) - from file "angular2/src/forms/form_builder.ts"
warn: Invalid link (does not match any doc): "Control" - doc "FormBuilder" (class) - from file "angular2/src/forms/form_builder.ts"
warn: Dangling Links Found in "partials/modules/angular2/annotations/index.html":
- /angular2/annotations/ComponentAnnotation extends Directive,
- /angular2/annotations/DirectiveAnnotation extends Injectable
warn: Dangling Links Found in "partials/modules//angular2/annotations/DirectiveAnnotation extends Injectable/index.html":
- QueryList,
- QueryList,
- annotations/onChange,
- annotations/onDestroy,
- annotations/onAllChangesDone,
- pipes/keyValDiff
warn: Dangling Links Found in "partials/modules/angular2/change_detection/index.html":
- /angular2/change_detection/ASTWithSource extends AST,
- /angular2/change_detection/AccessMember extends AST,
- /angular2/change_detection/LiteralArray extends AST,
- /angular2/change_detection/ImplicitReceiver extends AST,
- /angular2/change_detection/DehydratedException extends BaseException,
- /angular2/change_detection/ExpressionChangedAfterItHasBeenChecked extends BaseException,
- /angular2/change_detection/ChangeDetectionError extends BaseException,
- /angular2/change_detection/DynamicProtoChangeDetector extends ProtoChangeDetector,
- /angular2/change_detection/JitProtoChangeDetector extends ProtoChangeDetector,
- /angular2/change_detection/DynamicChangeDetector extends AbstractChangeDetector,
- /angular2/change_detection/NullPipe extends Pipe,
- /angular2/change_detection/NullPipeFactory extends PipeFactory,
- /angular2/change_detection/DynamicChangeDetection extends ChangeDetection,
- /angular2/change_detection/JitChangeDetection extends ChangeDetection,
- /angular2/change_detection/PreGeneratedChangeDetection extends ChangeDetection
warn: Dangling Links Found in "partials/modules//angular2/change_detection/ChangeDetection/index.html":
- DynamicChangeDetection,
- JitChangeDetection,
- DynamicChangeDetection,
- JitChangeDetection
warn: Dangling Links Found in "partials/modules//angular2/change_detection/DynamicChangeDetection extends ChangeDetection/index.html":
- JitChangeDetection
warn: Dangling Links Found in "partials/modules//angular2/change_detection/JitChangeDetection extends ChangeDetection/index.html":
- DynamicChangeDetection
warn: Dangling Links Found in "partials/modules/angular2/core/index.html":
- /angular2/core/SelfAnnotation extends Visibility,
- /angular2/core/AncestorAnnotation extends Visibility,
- /angular2/core/ParentAnnotation extends Visibility,
- /angular2/core/UnboundedAnnotation extends Visibility,
- /angular2/core/QueryAnnotation extends DependencyAnnotation,
- /angular2/core/AttributeAnnotation extends DependencyAnnotation,
- /angular2/core/QueryList<T> extends BaseQueryList<T>
warn: Dangling Links Found in "partials/modules//angular2/core/QueryAnnotation extends DependencyAnnotation/index.html":
- QueryList,
- QueryList
warn: Dangling Links Found in "partials/modules/angular2/di/index.html":
- /angular2/di/NoBindingError extends AbstractBindingError,
- /angular2/di/AbstractBindingError extends BaseException,
- /angular2/di/AsyncBindingError extends AbstractBindingError,
- /angular2/di/CyclicDependencyError extends AbstractBindingError,
- /angular2/di/InstantiationError extends AbstractBindingError,
- /angular2/di/InvalidBindingError extends BaseException,
- /angular2/di/NoAnnotationError extends BaseException
warn: Dangling Links Found in "partials/modules/angular2/forms/index.html":
- ControlGroup,
- Control,
- Control,
- /angular2/forms/Control extends AbstractControl,
- /angular2/forms/ControlGroup extends AbstractControl,
- /angular2/forms/ControlArray extends AbstractControl,
- /angular2/forms/ControlNameDirective extends ControlDirective,
- /angular2/forms/FormControlDirective extends ControlDirective,
- /angular2/forms/NgModelDirective extends ControlDirective,
- /angular2/forms/ControlGroupDirective extends ControlContainerDirective,
- /angular2/forms/FormModelDirective extends ControlContainerDirective implements FormDirective,
- /angular2/forms/TemplateDrivenFormDirective extends ControlContainerDirective implements
FormDirective,
- /angular2/forms/DefaultValueAccessor implements ControlValueAccessor,
- /angular2/forms/CheckboxControlValueAccessor implements ControlValueAccessor,
- /angular2/forms/SelectControlValueAccessor implements ControlValueAccessor
warn: Dangling Links Found in "partials/modules//angular2/forms/Control extends AbstractControl/index.html":
- ControlGroup,
- ControlArray
warn: Dangling Links Found in "partials/modules//angular2/forms/ControlGroup extends AbstractControl/index.html":
- Control,
- Control,
- ControlArray,
- ControlArray
warn: Dangling Links Found in "partials/modules//angular2/forms/ControlArray extends AbstractControl/index.html":
- Control,
- Control,
- ControlGroup,
- ControlGroup
warn: Dangling Links Found in "partials/modules//angular2/forms/DefaultValueAccessor implements ControlValueAccessor/index.html":
- Control
warn: Dangling Links Found in "partials/modules//angular2/forms/SelectControlValueAccessor implements ControlValueAccessor/index.html":
- Control
warn: Dangling Links Found in "partials/modules//angular2/forms/FormBuilder/index.html":
- ControlGroup,
- Control,
- ControlGroup,
- Control
warn: Dangling Links Found in "partials/modules/angular2/pipes/index.html":
- /angular2/pipes/PromisePipe extends Pipe,
- /angular2/pipes/UpperCasePipe extends Pipe,
- /angular2/pipes/LowerCasePipe extends Pipe,
- /angular2/pipes/ObservablePipe extends Pipe,
- /angular2/pipes/JsonPipe extends Pipe,
- /angular2/pipes/IterableChanges extends Pipe,
- /angular2/pipes/KeyValueChanges extends Pipe
warn: 83 'unmatched links'