Skip to content

Get rid of the register helper for directives #2

@jgoux

Description

@jgoux

Hello,
I want to thank you for this awesome project. I'm switching to es6 and it's really helpful to have all the examples. :)

I'd like to avoid the register helper and use directly angular functions (directive, factory, controller...).
It works well for the controller, but not so well for the directives (the "final boss" :P).

Do you think it's possible to create a Directive base class which hold a factory method to create child classes (including the compile/link method tricks) ? If so, could you provide an example of such a class ?

So you could do :

class myCustomComponent extends Directive {
constructor(inject1, inject2) {}
customMethod1(){}
}

OR

extends directly the "angular" object to make the switch invisible ?

Thanks again. :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions