Victor Savkin
Victor Savkin
@vicb After looking into it more I found out that the fix I had implemented is not going to work. The reason is that Platform.js emulates the host selector as...
Platform.js uses one selector for handling `:host` and scoping child nodes. ``` css :host { color: red; } div { color: green; } ``` will be transformed into: ``` css...
Can we change Angular to restrict what kind of selectors you can use for components? It would be interesting look at the usage patterns we have today to see if...
> I first thought about that but that would be a bad solution. Can you expand on that? I think we already support only one component per element, and it...
> There is no reason to add this constraint on angular. Selecting a class (or an attribute) should work equally well than selecting a class or an attribute. Plus it...
> YCan't you just add a host-selector attribute to all children with the value set to the selector? For example childrens to div[my-attr] would have host-selector="div[my-attr]". @Pajn Could you provide...
@Pajn I'm probably missing something, but I don't think it will work with :host: ``` css :host(.myclass) { color: red; } ``` Will be transformed into: ``` css host-selector="div[my-attr]".myclass {...
@Pajn what I meant is that platform.js uses the same token for `:host` and other elements. ``` dart :host {} div {} ``` will become: ``` dart TOKEN {} div[TOKEN]...
@Pajn Totally agree with you. I looked into it a bit more and I think patching it will be pretty straightforward. I might do it this weekend.
We can also do something like this: https://github.com/angular/angular/commit/1681e4f57f4c4fa45a556502df0533131c2d64b4