r/angularjs • • Nov 13 '15

Exploring the Angular 1.5 .component() method

http://toddmotto.com/exploring-the-angular-1-5-component-method
57 Upvotes

13 comments sorted by

View all comments

1

u/xCavemanNinjax Nov 14 '15

The template property can be defined as a function that is now injected with $element and $attrs locals. If the template property is a function then it needs to return an String representing the HTML to compile:

This reminds me of a react component with props and a render function.