angular-docs-cn/modules/angular2/test/router
Julie Ralph e1bf3d33f8 feat(debug): replace DebugElement with new Debug DOM
Now, using `ng.probe(element)` in the browser console returns
a DebugElement when in dev mode.

`ComponentFixture#debugElement` also returns a new DebugElement.

Breaking Change:

This is a breaking change for unit tests. The API for the DebugElement
has changed. Now, there is a DebugElement or DebugNode for every node
in the DOM, not only nodes with an ElementRef. `componentViewChildren` is
removed, and `childNodes` is a list of ElementNodes corresponding to every
child in the DOM. `query` no longer takes a scope parameter, since
the entire rendered DOM is included in the `childNodes`.

Before:

```
componentFixture.debugElement.componentViewChildren[0];
```

After
```
// Depending on the DOM structure of your component, the
// index may have changed or the first component child
// may be a sub-child.
componentFixture.debugElement.children[0];
```

Before:

```
debugElement.query(By.css('div'), Scope.all());
```

After:

```
debugElement.query(By.css('div'));
```

Before:

```
componentFixture.debugElement.elementRef;
```

After:

```
componentFixture.elementRef;
```
2016-01-29 11:28:10 -08:00
..
integration feat(debug): replace DebugElement with new Debug DOM 2016-01-29 11:28:10 -08:00
component_recognizer_spec.ts refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
hash_location_strategy_spec.ts feat(router): add support for APP_BASE_HREF to HashLocationStrategy 2015-11-25 22:29:43 +00:00
location_spec.ts refactor(tests): rename beforeEachBindings -> beforeEachProviders 2015-12-02 14:09:13 -08:00
path_location_strategy_spec.ts feat(router): add support for APP_BASE_HREF to HashLocationStrategy 2015-11-25 22:29:43 +00:00
path_recognizer_spec.ts refactor(router): improve recognition and generation pipeline 2015-11-30 17:06:03 +00:00
route_config_spec.dart style(dart): Run dartfmt v0.1.8+2 on all pure Dart code 2015-07-28 12:44:03 -07:00
route_config_spec.ts feat(core): enable dev mode by default 2015-12-15 08:34:44 -08:00
route_registry_spec.ts fix(router): correctly sort route matches with children by specificity 2015-12-21 10:38:13 +00:00
router_link_spec.ts fix(router): correctly sort route matches with children by specificity 2015-12-21 10:38:13 +00:00
router_link_transform_spec.ts feat(router): implement router link DSL 2015-12-04 00:47:20 +00:00
router_spec.ts fix(router): set correct redirect/default URL from hashchange 2015-12-08 22:34:19 +00:00
spies.dart refactor(test): Remove unnecessary `noSuchMethod` 2016-01-15 22:53:09 +00:00
spies.ts feat(router): add support for APP_BASE_HREF to HashLocationStrategy 2015-11-25 22:29:43 +00:00
url_parser_spec.ts test(router): add missing tests for the url parser 2015-10-13 12:06:22 -07:00