{"action":"created","issue":{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/22","labels_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/22/comments","events_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/22/events","html_url":"https://github.com/eHealthAfrica/eHealthAfrica.github.io/issues/22","id":88702625,"number":22,"title":"Coding styleguide and linting for HTML/Angular views","user":{"login":"FrancescoK","id":919278,"avatar_url":"https://avatars.githubusercontent.com/u/919278?v=3","gravatar_id":"","url":"https://api.github.com/users/FrancescoK","html_url":"https://github.com/FrancescoK","followers_url":"https://api.github.com/users/FrancescoK/followers","following_url":"https://api.github.com/users/FrancescoK/following{/other_user}","gists_url":"https://api.github.com/users/FrancescoK/gists{/gist_id}","starred_url":"https://api.github.com/users/FrancescoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrancescoK/subscriptions","organizations_url":"https://api.github.com/users/FrancescoK/orgs","repos_url":"https://api.github.com/users/FrancescoK/repos","events_url":"https://api.github.com/users/FrancescoK/events{/privacy}","received_events_url":"https://api.github.com/users/FrancescoK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-16T11:47:05Z","updated_at":"2015-06-16T14:08:14Z","closed_at":null,"body":"Suggestion:\r\n\r\n## Syntax\r\n(mostly from mdo’s codeguide.co):\r\n- Use soft tabs with two spaces\r\n- Use only lowercase\r\n- Nested elements should be indented once (two spaces).\r\n- Always use double quotes, never single quotes or no quote signs, on attributes.\r\n- Don't include a trailing slash in self-closing elements—the HTML5 spec says they're optional.\r\n- Don’t omit optional closing tags (e.g. ```</li>``` or ```</body>```).\r\n- Use a new line for every block, list, or table element, and indent every such child element.\r\n\r\n## Attribute order\r\nHTML attributes should come in this particular order for easier reading of code.\r\n\r\n- class\r\n- id, name\r\n- data-*\r\n- src, for, type, href, value\r\n- title, alt\r\n- aria-*, role\r\n- ng-directives (This way is easy to look to the code and find enhanced HTML by the framework (what improve the maintainability, quote from https://github.com/mgechev/angularjs-style-guide)\r\n\r\n## Angular:\r\n- Use one-way binding where possible\r\n- Use a separate ```<span translate>``` for localized strings instead of setting translate on another element\r\n- When you need to set the src of an image dynamically use ng-src instead of src with {{ }} template.\r\n- When you need to set the href of an anchor tag dynamically use ng-href instead of href with {{ }} template.\r\n- Instead of using scope variable as string and using it with style attribute with {{ }}, use the directive ng-style with object-like parameters and scope variables as values\r\n\r\nTo discuss: \r\n- Set spaces after and before {{}}, e.g. {{ person.name }} instead of {{person.name}} or vice versa?"},"comment":{"url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/comments/112444697","html_url":"https://github.com/eHealthAfrica/eHealthAfrica.github.io/issues/22#issuecomment-112444697","issue_url":"https://api.github.com/repos/eHealthAfrica/eHealthAfrica.github.io/issues/22","id":112444697,"user":{"login":"febeling","id":4313,"avatar_url":"https://avatars.githubusercontent.com/u/4313?v=3","gravatar_id":"","url":"https://api.github.com/users/febeling","html_url":"https://github.com/febeling","followers_url":"https://api.github.com/users/febeling/followers","following_url":"https://api.github.com/users/febeling/following{/other_user}","gists_url":"https://api.github.com/users/febeling/gists{/gist_id}","starred_url":"https://api.github.com/users/febeling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/febeling/subscriptions","organizations_url":"https://api.github.com/users/febeling/orgs","repos_url":"https://api.github.com/users/febeling/repos","events_url":"https://api.github.com/users/febeling/events{/privacy}","received_events_url":"https://api.github.com/users/febeling/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T14:08:14Z","updated_at":"2015-06-16T14:08:14Z","body":"I like the `{{ viewModel }}` version better.\r\n\r\nAnything about html tags with lots of attributes on multiple lines vs. single line? (I like to arrange them vertically.)\r\n\r\nWe should agree on some transition process. Reordering all attributes e.g. right now wouldn't feel like responsible use of time =)."}}