Context
I'm creating an extractor for some html elements in my application, some elements like <foo key="FOO_KEY">My Value</foo>
need to be extracted to be all in a json for i18n purpose.
Because of some specific needs, I can't use angular2 i18n system, so I created my own, using a component
, a pipe
and a service
.
To extract service calls, I can wrap typescript
compiler and that's what I've done.
Since the last version of my tool (made using angular2 v2.0.0-rc.1
) I was perfectly able to get an HTML Ast using those imports:
import {HtmlParser} from "@angular/compiler/src/html_parser";
import {HtmlElementAst, HtmlAttrAst} from "@angular/compiler/src/html_ast";
and parsing the html templates, then getting what I need using the Ast.
Problem
I updated to angular2 v2.0.X
and my imports below are not exported anymore. So I'm not able to extract HTML Ast anymore, which is a big issue since it's the only proper way to extract data from html (regex is not an option, see RegEx match open tags except XHTML self-contained tags)