Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to update @Directive so it acts like the ng2 annotation #20

Open
timkindberg opened this issue Jul 10, 2015 · 0 comments
Open

Need to update @Directive so it acts like the ng2 annotation #20

timkindberg opened this issue Jul 10, 2015 · 0 comments

Comments

@timkindberg
Copy link
Contributor

See: https://angular.io/docs/js/latest/api/annotations/DirectiveAnnotation-class.html

@directive is basically a @component without a view. So its a directive that alters the behavior of an element. So we should be able to use it just like @component, like this;

@Directive({
  selector: '[dependency]',
  properties: ['id']
})
class Dependency { }

I know right now @directive is an ng1 decorator for basically doing ng1 style directive declaration. But I think a1atscript should focus on being a pure ng2 polyfill (my two cents).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant