Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static get properties() {
- return {
- plan:Object,
- };
- }
- <div class="body"><p class="title">${this.plan.title}</p></div>
- <health-check plan='{ "title" : "Solution Architecure",
- "status" : "Approved" }'></health-check>
- <health-check planString='{
- "title": "Solution Architecure",
- "status": "Approved"
- }'>
- </health-check>
- class HealthCheck extends LitElement {
- static get properties () {
- return {
- planString: String
- }
- }
- render () {
- return html`
- <div class='body'>
- <p class='title'>${JSON.parse(this.planString).title}</p>
- </div>
- `
- }
- }
- <my-app></my-app>
- class App extends LitElement {
- render () {
- return html`
- <health-check .plan='${{
- title: 'Solution Architecure',
- status: 'Approved'
- }}'>
- </health-check>
- `
- }
- }
- class HealthCheck extends LitElement {
- static get properties () {
- return {
- plan: Object
- }
- }
- constructor () {
- super()
- this.plan = {}
- }
- render () {
- return html`
- <div class='body'>
- <p class='title'>${this.plan.title}</p>
- </div>
- `
- }
- }
Add Comment
Please, Sign In to add comment