UNPKG

avalon2

Version:

an elegant efficient express mvvm framework

46 lines (37 loc) 812 B
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>avalon</title> <script src="./dist/avalon.js"></script> </head> <body> <div ms-controller='duplex7'> <div> <span>ddd</span> </div> <p>{{@aaa}}</p> <div ms-text='@aaa'>xxx</div> <p ms-html='@hhh'>xxx</p> <p ms-attr='{attr:@eee}'></p> <ul> <li ms-for="el in @arr">{{el}}</li> </ul> </div> <script> var a = 333 vm = avalon.define({ $id: 'duplex7', eee: 333, arr: [11, 22, 33], hhh: '<strong>{{@eee}}</strong>', aaa: 111, }) </script> <style> .active { background: red } </style> </body> </html>