This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*================================================== | |
* Awesome Plugin 1.0.0 | |
* Awesome plugin for Framework7 0.8.6+ | |
* | |
* http://www.path.to/plugin/home/page | |
* | |
* Copyright 2010-2014, John Doe | |
* The Company | |
* http://www.path.to/developer/home/page | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
name: 'my-card', | |
render() { | |
return ( | |
<div className="card" id="some-id"> | |
<p>This is card</p> | |
</div> | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
class MyCard extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return React.createElement( | |
'div', | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
name: 'my-card', | |
render() { | |
const _h = this.$createElement; | |
return _h( | |
'div', | |
{ | |
class: 'card', | |
attrs: { | |
id: 'some-id', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="page"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="title">Profile</div> | |
</div> | |
</div> | |
<div class="page-content"> | |
<div class="list simple-list"> | |
<ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="page"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="title">Profile</div> | |
</div> | |
</div> | |
<div class="page-content"> | |
<div class="list simple-list"> | |
<ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="page"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="title">Profile</div> | |
</div> | |
</div> | |
<div class="page-content"> | |
{{#if user}} | |
<!-- Show user list when it is loaded --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- new "es" attribute to treat it as template literal --> | |
<template es> | |
<div class="page"> | |
<div class="navbar"> | |
<div class="navbar-inner"> | |
<div class="title">Profile</div> | |
</div> | |
</div> | |
<div class="page-content"> | |
<!-- use conditional (ternary) operator instead of if/else --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template es> | |
... | |
${this.users.map((user, index) => ` | |
<div class="list simple-list" data-index="${index}" data-id="${user.id}"> | |
<ul> | |
<li>First Name: ${user.firstName}</li> | |
<li>Last Name: ${user.lastName}</li> | |
<li>Age: ${user.age}</li> | |
</ul> | |
</div> |
OlderNewer