angular/modules/@angular/core/test
Tobias Bosch f2bbef3e33 fix(core): allow to query content of templates that are stamped out at a different place
Previously, if a `TemplateRef` was created in a `ViewContainerRef`
at a different place, the content was not query able at all.

With this change, the content of the template can be queried
as if it was stamped out at the declaration place of the template.

E.g. in the following example, the `QueryList<ChildCmp>` will
be filled once the button is clicked.

```
@Component({
  selector: ‘my-comp’,
  template: ‘<button #vc (click)=“createView()”></button>’
})
class MyComp {
  @ContentChildren(ChildCmp)
  children: QueryList<ChildCmp>;

  @ContentChildren(TemplateRef)
  template: TemplateRef;

  @ViewChild(‘vc’, {read: ViewContainerRef})
  vc: ViewContainerRef;

  createView() {
    this.vc.createEmbeddedView(this.template);
  }
}

@Component({
  template: `
<my-comp>
  <template><child-cmp></child-cmp></template>
</my-comp>
`
})
class App {}
```

Closes #12283
Closes #12094
2016-11-04 10:50:27 -07:00
..
animation refactor(animations): ensure animation data-structures are created only when used 2016-10-14 15:43:41 -07:00
change_detection refactor: remove most facades (#12399) 2016-10-21 15:14:44 -07:00
debug chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
di refactor(facade): Inline isBlank called with object-type argument (#11992) 2016-09-30 09:26:53 -07:00
dom chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
facade chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
linker fix(core): allow to query content of templates that are stamped out at a different place 2016-11-04 10:50:27 -07:00
metadata chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
reflection refactor(core): delete unused reflector code 2016-10-17 23:17:34 -07:00
testability chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
util fix(core): fix decorator defalut values 2016-10-17 23:17:34 -07:00
zone refactor: simplify arrow functions (#12057) 2016-10-04 15:57:37 -07:00
application_init_spec.ts chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
application_module_spec.ts chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
application_ref_spec.ts perf(platform-browser): don’t use DomAdapter any more 2016-11-03 16:29:51 -07:00
component_fixture_spec.ts chore(formatting): fix formatting for component fixture spec (#10986) 2016-08-22 10:20:21 -07:00
dev_mode_spec.ts fix(testing): remove deprecated testing APIs (#9923) 2016-07-11 16:04:32 -07:00
directive_lifecycle_integration_spec.ts test: fix existing tests by removing usage of obsolete stuff like component level directives, AsyncCompleter and TestComponentBuilder 2016-08-23 09:59:00 -07:00
error_handler_spec.ts test(core): update ErrorHandler tests to handle browsers without stack (#11141) 2016-08-29 08:17:45 -07:00
fake_async_spec.ts chore(lint): remove unused imports (#11923) 2016-09-27 17:12:25 -07:00
forward_ref_integration_spec.ts fix(DomSchemaRegistry): detect invalid elements 2016-08-30 21:32:03 -07:00
spies.ts chore(lint): Added license headers to most TypeScript files 2016-06-23 09:47:54 -07:00
testing_internal_spec.ts refactor(core): cleanup SpyObject (#12221) 2016-10-11 15:44:48 -07:00