You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why is directive created with Scala class and component with an annotation?
This annotation was an experiment to support the angular2 concept of components with Angular 1.3 (which had no .component()). Hence, if we want to use a single Scala class as a component, we need to create a directive definition object and a controller constructor function from it.
This could be accomplished at runtime (eg. by writing our own version of .component(), although the missing support for static class members in Scala.js probably complicates this approach). Or we can derive a directive object + a controller class at compile time. The latter approach was taken in angulate, and the only way (afaik) to create a derived object + class from a given input class at compile time in Scala are macro annotations.
Why is directive created with Scala class and component with an annotation?
The text was updated successfully, but these errors were encountered: