-
Notifications
You must be signed in to change notification settings - Fork 137
Stackblitz support instructions
stefanoScalzo edited this page Nov 29, 2019
·
8 revisions
- Selectors end with -example
- If there is a css associated to the example, it is in a scss file and not inline.
- Make sure all filenames end with -example
- If and only if all components contain just the templateUrl and selector are they allowed to be in the same .ts file. Otherwise place them in their own typescript files.
- Make sure the selector corresponds to the filename
- Add the example to the component’s docs.html and be sure to give the Example File a name
- Go to the docs folder of the example component you are in.
- Go to the array of Example Files
- Import all files using import * as nameUsedInExampleFile from '!raw-loader!./pathToFile 5. Make sure the secondary files and tertiary .ts files are placed in the order below
{
Language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
Component: 'nameOfComponentInTsFile'
typescriptFileCode: nameOfExampleTs
scssFileCode: nameOfExampleScss //if applicable
}
{
Language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
Component: 'nameOfComponentInTsFile'
Second-file: 'nameOfTsFileThatSharesCode'
typescriptFileCode: nameOfExampleTs
scssFileCode: nameOfExampleScss
}
{
Language: 'html'
fileName: 'name-of-file-example'
code: nameOfExampleHtml
scssFileCode: nameOfExampleScss
},
{
Language: 'typescript'
Component: 'nameOfComponentInTsFile'
fileName: nameOfTsFile-example
code: nameOfExampleTs
}
When Modules require more than one component or any specific adding not given from the default, create a module file and link it.
{
Language: ‘html’
fileName: ‘name-of-file-example’
code: nameOfExampleHtml
scssFileCode: nameOfExampleScss //if applicable
},
{
language: 'typescript',
code: nameOfExampleTs,
name: ‘Name Displayed On site',
thirdFile: ‘filename-3—example’,
fileName: 'filename-3—example',
component: 'nameOfThirdComponent'
},
{
language: 'typescript',
code: nameOfExampleTs,
name: 'Name Displayed On site',
secondFile: 'second-example',
fileName: 'second-example',
component: 'nameOfSecondComponent'
},
{
language: 'typescript',
code: nameOfExampleTs,
fileName: ‘main-typescript-example',
component: 'MainComponent'
},
{
language: 'typescript',
code: customModule,
name: 'Module',
module: 'app.module.ts',
}