Stencil Container with if-statements
npm install stencil-container- Put in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
npm install stencil-container --save in the head of your index.html anywhere in your template, JSX, html etcnpm install stencil-container --saveimport { } from 'stencil-container'; anywhere in your template, JSX, html etcAn expression that is either true or false.
false?
Will not show the child elements content.
true?
Will show the child elements content.
container test?
Without the st-if parameter it assumes the content should be shown.
``html
Will be shown!Will not be shown!Will be shown!Will be shown!Will be shown!Will not be shown!
`
`jsx
export class MyApp {
private expression1 = '1 == 1';
private expression2 = '1 == 2';
render() {
return (
$3
Let me know if it works! :)
Development
Installation:
`bash
git clone https://github.com/nerdic-coder/stencil-container.git stencil-container
cd stencil-container
npm install
`Running:
`bash
npm start
`Tests:
`bash
npm run test
`Watchable tests:
`bash
npm run test.watch
``Feel free to read my blog article on how I created this stencil component,
How I created and published my first Stencil component
All feedback are welcome!