LoginSignup
0
0

More than 5 years have passed since last update.

riot.js 自明な設定をtag無しで設定する。

Posted at

全体を括れば、変数のように使える。有っても無くてもエラーにならない。

<script src="//gnjo.github.io/riot.js"></script>
<system>
<header>{today}</header>
<aricle>xxx</aricle>
<footer>{copyright}{owner}</footer>
</system> 
riot.tag('system', false, function(opts) {
  this.copyright = new Date().toISOString().slice(0,'YYYY'.length)
  this.today=new Date().toISOString();
  this.owner='gnjo'
})
riot.mount('*')
;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0