This file contains 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
//a quick example of how to use actual 'if' statements inside template literals, | |
//without using ternary operator. Sometimes this is cleaner if you have complex conditionals or nested conditionals. | |
//data param is passed in via render(template(data), this) - if not using lit-html, could be any function | |
template = (data) => html` | |
<div id="job_edit" class="modal"> | |
<div class="modal-content"> | |
${ | |
//we're just going to wrap an anonymous inline function here and then call it with some data | |
(job => { //job here, is just an example, it could be anything, it's passed in below in (data.job) | |
if(job) |
This file contains 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
Show hidden characters
{ | |
"presets": ["es2015"], | |
"plugins": [ | |
"add-module-exports" | |
], | |
} |