Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

make $compile accept DDO without a factory #12397

Closed
jansepke opened this issue Jul 21, 2015 · 2 comments
Closed

make $compile accept DDO without a factory #12397

jansepke opened this issue Jul 21, 2015 · 2 comments

Comments

@jansepke
Copy link
Contributor

could we add the possibility to define a directive without a factory. this would only be syntactic sugar and I could make a PR for this. This would make the creation of directives easier for beginners.

angular.module('sample', []).directive('test', {
    template: 'Hello World!'
});
@Narretz
Copy link
Contributor

Narretz commented Jul 23, 2015

Thanks for your suggestion. In my opinion, this is not something really needed. Just another way to do something. Also, it's a golden opportunity for beginners to learn what a factory is. On a side note, we have the angular.component helper lined up for 1.5, which will help create "idiomatic components" for angular 1 (also good for migration to ng2): #12166

@petebacondarwin
Copy link
Contributor

We now have the component helper in master for these simple cases.

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

No branches or pull requests

3 participants