Making your Angular 2 library statically analyzable for AoT
Isaac Mann

Turns out, if you try to have dynamically defined angular styles, you run into the same problem as with #4. You can work around it though by just using string concatenation to insert your dynamic variables, rather than using fancy es6 string interpolation. It’s a bummer not being able to use the string interpolation, but having dynamically defined styles, you can reduce a lot of repetition. I would be curious if the same work-around would solve the problem for dynamic templates, although you would get your dynamic template at the cost of some not very elegant syntax.