-
Notifications
You must be signed in to change notification settings - Fork 117
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
Create Contributing Guidelines #20
Comments
I think it could be a good idea to follow John Papa's style guide https://github.com/johnpapa/angular-styleguide |
I'll try to get in here on the weekend. For this moment, if you're following:
you are good to go. |
But for the moment some directive do not follow John Papa's style guide. Do we need to refactor them? |
What do you think of... The file need to have the name of the directive suffixed by Your file need to contain only one directive! Your boilerplate need also to follow IIFE syntax and use (function() {
'use strict';
//
})(); All of your function need to be named and you need to create them after the return statement. You also need to create nested function if necessary (function() {
'use strict';
angular
.module('app.widgets')
.directive('smAccordion', smAccordion); // Named function
function smAccordion() {
var directive = {
restrict: 'E',
replace: true,
transclude: true,
template: template, // Named function
link: link // Named function
};
return directive; // Return statement
function link(scope, element, attrs, ctrl, transclude) {
transclude(scope, transcludeFn); // Nested named function
function transcludeFn(nodes) {
// Transclude stuff
}
}
function template() {
return '';
}
}
})(); The first expression of the function link(scope, element, attrs, ctrl, transclude) {
transclude(scope, transcludeFn);
// Var's declarations
var active = attrs.active || false;
// Bindings
element.on('click', toggle);
// Functions
function toggle() {
// Toogle stuff
}
function transcludeFn(nodes) {
// Transclude stuff
}
} |
@m0t0r @caitp Please when you get a chance send me an email at [email protected]. I'm hoping to send off a kickoff email to organize all the people interested in getting involved in this project and I don't have your e-mails. |
I totaly agree to use John Papa's styleguide. 👍 |
+1 |
As we are thinking of using angular 1.4 with ES6 is legal research on things like: johnpapa/angular-styleguide#390 |
Further to documentation and contribution guide, we should also chat about approach and goals of the project. |
@kowsheek its a good scene. My intention was to create a first release with some references as: angular-bootstrap, angular material, but we need to discuss where to go. |
Few thoughts I would like to share:
|
No description provided.
The text was updated successfully, but these errors were encountered: