refactor(upgrade): use shared code in downgradeNg2Component() (#14037)

This unified the implementations of dynamic's `downgradeNg2Component()` and
static's `downgradeComponent()`.
This commit is contained in:
Georgios Kalpakas
2017-01-19 13:04:24 +02:00
committed by Miško Hevery
parent 1367cd9569
commit ea63676970
16 changed files with 247 additions and 515 deletions

View File

@ -7,3 +7,9 @@
*/
export * from '../common/test_helpers';
export function nodes(html: string) {
const div = document.createElement('div');
div.innerHTML = html.trim();
return Array.prototype.slice.call(div.childNodes);
}