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
.component helper #662
Comments
This way the controller can be tested.
|
@softsimon: |
I can second, thx @gkalpak . @softsimon you can simply skip this line from above: I also big fan of this style guide. @xavhan for
I might call it I also curious what @johnpapa think about this, appreciate.your guidance in advance. |
👍 for vm.$onInit = activate;
function activate() {
} |
closed for #766 to be the place for component discussion |
With the release of Angular 1.5 we can use the .component() shortcut to create component directives.
Do you have any suggestions in the way to use it ?
I have been a big follower of your styleguide for some time and here is how I usually write them.
Small ones, without the need of a controller, I like to write the template inside the same file as the return value of a hoisted function
For more advanced ones I like to put the template in a separate file and use 'templateUrl' property.
I am also curious about your opinion about the $onInit hook and how do you think components should be tested.
Thanks
The text was updated successfully, but these errors were encountered: