diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade index f2a8490012..de1589c7fa 100644 --- a/public/docs/ts/latest/guide/style-guide.jade +++ b/public/docs/ts/latest/guide/style-guide.jade @@ -65,9 +65,8 @@ a(id='toc') We apply the [Single Responsibility Principle](https:\/\/en.wikipedia.org/wiki/Single_responsibility_principle) to all Components, Services, and other symbols we create. This helps make our app cleaner, easier to read and maintain, and more testable. - ### Rule of One - - #### Style 01-01 + ### Rule of One + #### Style 01-01 .s-rule.do :marked **Do** define one thing (e.g. service or component) per file. @@ -118,9 +117,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Small Functions - - #### Style 01-02 + ### Small Functions + #### Style 01-02 .s-rule.do :marked **Do** define small functions @@ -159,9 +157,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### General Naming Guidelines - - #### Style 02-01 + ### General Naming Guidelines + #### Style 02-01 .s-rule.do :marked @@ -187,9 +184,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Separate File Names with Dots and Dashes - - #### Style 02-02 + ### Separate File Names with Dots and Dashes + #### Style 02-02 .s-rule.do :marked @@ -229,9 +225,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Components and Directives - - #### Style 02-03 + ### Components and Directives + #### Style 02-03 .s-rule.do :marked @@ -310,9 +305,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Service Names - - #### Style 02-04 + ### Service Names + #### Style 02-04 .s-rule.do :marked @@ -375,9 +369,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Bootstrapping - - #### Style 02-05 + ### Bootstrapping + #### Style 02-05 .s-rule.do :marked @@ -399,9 +392,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Directive Selectors - - #### Style 02-06 + ### Directive Selectors + #### Style 02-06 .s-rule.do :marked @@ -419,9 +411,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Custom Prefix for Components - - #### Style 02-07 + ### Custom Prefix for Components + #### Style 02-07 .s-rule.do :marked @@ -456,9 +447,8 @@ a(href="#toc") Back to top :marked :marked - ### Custom Prefix for Directives - - #### Style 02-08 + ### Custom Prefix for Directives + #### Style 02-08 .s-rule.do :marked @@ -482,9 +472,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Pipe Names - - #### Style 02-09 + ### Pipe Names + #### Style 02-09 .s-rule.do :marked @@ -523,9 +512,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Unit Test File Names - - #### Style 02-10 + ### Unit Test File Names + #### Style 02-10 .s-rule.do :marked @@ -588,9 +576,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### End to End Test File Names - - #### Style 02-11 + ### End to End Test File Names + #### Style 02-11 .s-rule.do :marked @@ -634,9 +621,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Classes - - #### Style 03-01 + ### Classes + #### Style 03-01 .s-rule.do :marked @@ -660,9 +646,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Constants - - #### Style 03-02 + ### Constants + #### Style 03-02 .s-rule.do :marked @@ -686,9 +671,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Interfaces - - #### Style 03-03 + ### Interfaces + #### Style 03-03 .s-rule.do :marked @@ -712,9 +696,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Properties and Methods - - #### Style 03-04 + ### Properties and Methods + #### Style 03-04 .s-rule.do :marked @@ -746,9 +729,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Import Destructuring Spacing - - #### Style 03-05 + ### Import Destructuring Spacing + #### Style 03-05 .s-rule.do :marked @@ -768,9 +750,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Import Line Spacing - - #### Style 03-06 + ### Import Line Spacing + #### Style 03-06 .s-rule.do :marked @@ -812,9 +793,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### LIFT - - #### Style 04-01 + ### LIFT + #### Style 04-01 .s-rule.do :marked @@ -832,9 +812,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Locate - - #### Style 04-02 + ### Locate + #### Style 04-02 .s-rule.do :marked @@ -848,9 +827,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Identify - - #### Style 04-03 + ### Identify + #### Style 04-03 .s-rule.do :marked @@ -876,9 +854,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Flat - - #### Style 04-04 + ### Flat + #### Style 04-04 .s-rule.do :marked @@ -896,9 +873,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### T-DRY (Try to be DRY) - - #### Style 04-05 + ### T-DRY (Try to be DRY) + #### Style 04-05 .s-rule.do :marked @@ -916,9 +892,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Overall Structural Guidelines - - #### Style 04-06 + ### Overall Structural Guidelines + #### Style 04-06 .s-rule.do :marked @@ -984,9 +959,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Shared Folder - - #### Style 04-07 + ### Shared Folder + #### Style 04-07 .s-rule.do :marked @@ -1045,9 +1019,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Folders-by-Feature Structure - - #### Style 04-08 + ### Folders-by-Feature Structure + #### Style 04-08 .s-rule.do :marked @@ -1120,9 +1093,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Layout Components - - #### Style 04-09 + ### Layout Components + #### Style 04-09 .s-rule.do :marked @@ -1171,9 +1143,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Create and Import Barrels - - #### Style 04-10 + ### Create and Import Barrels + #### Style 04-10 .s-rule.consider :marked @@ -1261,9 +1232,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Lazy Loaded Folders - - #### Style 04-11 + ### Lazy Loaded Folders + #### Style 04-11 A distinct application feature or workflow may be *lazy loaded* or *loaded on demand* rather than when the application starts. .s-rule.do @@ -1279,9 +1249,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Prefix Lazy Loaded Folders with + - - #### Style 04-12 + ### Prefix Lazy Loaded Folders with + + #### Style 04-12 .s-rule.do :marked @@ -1315,9 +1284,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Never Directly Import Lazy Loaded Folders - - #### Style 04-13 + ### Never Directly Import Lazy Loaded Folders + #### Style 04-13 .s-rule.avoid :marked @@ -1334,9 +1302,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Lazy Loaded Folders May Import From a Parent - - #### Style 04-14 + ### Lazy Loaded Folders May Import From a Parent + #### Style 04-14 .s-rule.do :marked @@ -1353,9 +1320,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Use Component Router to Lazy Load - - #### Style 04-15 + ### Use Component Router to Lazy Load + #### Style 04-15 .s-rule.do :marked @@ -1371,9 +1337,8 @@ a(href="#toc") Back to top :marked ## Components - ### Components Selector Naming - - #### Style 05-02 + ### Components Selector Naming + #### Style 05-02 .s-rule.do :marked @@ -1398,9 +1363,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Components as Elements - - #### Style 05-03 + ### Components as Elements + #### Style 05-03 .s-rule.do :marked @@ -1436,9 +1400,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Extract Template and Styles to Their Own Files - - #### Style 05-04 + ### Extract Template and Styles to Their Own Files + #### Style 05-04 .s-rule.do :marked @@ -1477,9 +1440,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Decorate Input and Output Properties Inline - - #### Style 05-12 + ### Decorate Input and Output Properties Inline + #### Style 05-12 .s-rule.do :marked @@ -1515,9 +1477,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Avoid Renaming Inputs and Outputs - - #### Style 05-13 + ### Avoid Renaming Inputs and Outputs + #### Style 05-13 .s-rule.avoid :marked @@ -1545,9 +1506,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Member Sequence - - #### Style 05-14 + ### Member Sequence + #### Style 05-14 .s-rule.do :marked @@ -1571,9 +1531,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Put Logic in Services - - #### Style 05-15 + ### Put Logic in Services + #### Style 05-15 .s-rule.do :marked @@ -1609,9 +1568,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Don't Prefix Output Properties - - #### Style 05-16 + ### Don't Prefix Output Properties + #### Style 05-16 .s-rule.do :marked @@ -1647,9 +1605,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Put Presentation Logic in the Component Class - - #### Style 05-17 + ### Put Presentation Logic in the Component Class + #### Style 05-17 .s-rule.do :marked @@ -1679,9 +1636,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Use Directives to Enhance an Existing Element - - #### Style 06-01 + ### Use Directives to Enhance an Existing Element + #### Style 06-01 .s-rule.do :marked @@ -1705,9 +1661,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Use HostListener and HostBinding Class Decorators - - #### Style 06-03 + ### Use HostListener and HostBinding Class Decorators + #### Style 06-03 .s-rule.do :marked @@ -1733,9 +1688,8 @@ a(href="#toc") Back to top :marked ## Services - ### Services are Singletons in Same Injector - - #### Style 07-01 + ### Services are Singletons in Same Injector + #### Style 07-01 .s-rule.do :marked @@ -1756,9 +1710,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Single Responsibility - - #### Style 07-02 + ### Single Responsibility + #### Style 07-02 .s-rule.do :marked @@ -1780,9 +1733,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Providing a Service - - #### Style 07-03 + ### Providing a Service + #### Style 07-03 .s-rule.do :marked @@ -1816,9 +1768,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Use the @Injectable() Class Decorator - - #### Style 07-04 + ### Use the @Injectable() Class Decorator + #### Style 07-04 .s-rule.do :marked @@ -1844,9 +1795,8 @@ a(href="#toc") Back to top :marked ## Data Services - ### Separate Data Calls - - #### Style 08-01 + ### Separate Data Calls + #### Style 08-01 .s-rule.do :marked @@ -1880,9 +1830,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Implement Lifecycle Hooks Interfaces - - #### Style 09-01 + ### Implement Lifecycle Hooks Interfaces + #### Style 09-01 .s-rule.do :marked @@ -1911,9 +1860,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Component Router - - #### Style 10-01 + ### Component Router + #### Style 10-01 .s-rule.do :marked @@ -1954,9 +1902,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### Codelyzer - - #### Style A-01 + ### Codelyzer + #### Style A-01 .s-rule.do :marked @@ -1970,9 +1917,8 @@ a(href="#toc") Back to top .l-main-section :marked - ### File Templates and Snippets - - #### Style A-02 + ### File Templates and Snippets + #### Style A-02 .s-rule.do :marked