These are chat archives for angular/angular-2-ionic-2

25th
Mar 2015
so the @Template() with devices syntax you proposed earlier is a start
more in the issue, but basically I need to be able to bind services injected into a component depending upon attribute values
and ideally, set default attribute values in the template. I would do this in the constructor, but I also need to change Di bindings based on these values ...
Andrew Joslin
@ajoslin
Mar 25 2015 20:35
hey Misko, is it possible that attr-bindings could be evaluates before the constructor is invoked?
right now we have to wait for setTimeout
or there's also some onChange event I could use, right?
also, how can I do a PropertySetter with a dynamic class?
This message was deleted
Andrew Joslin
@ajoslin
Mar 25 2015 20:40

I'm doing this:

    this.setIsAside = (side) => {
      ele.domElement.classList.add('aside-content');
      ele.domElement.classList.add(`aside-${side}`);
    }

how can I do this with a @PropertySetter in a component?

I'm using properySetter successfully with expressions like 'class.hidden'
but I don't know how to express in angular a class expression
basically the ng2 equivalent of <element ng-class="myClassExpr()">
Andrew Joslin
@ajoslin
Mar 25 2015 22:01
so Misko, is it possible to setup a binding in my constructor?
eg bind style.transform to the value of my component's transform property
this is a binding on the host element
the alternative, of course, is that I stop using host elements for so much, and start using the inner elements for everything