Last active
June 17, 2021 11:43
-
-
Save daurnimator/9dd8168ab14846e880e4b50546b39110 to your computer and use it in GitHub Desktop.
Playing with Vue from fengari
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
-- Load Vue library | |
package.loadlib("https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js", "*") | |
-- Get Object helper | |
local Object = dofile("https://gist.githubusercontent.com/daurnimator/5a7fa933e96e14333962093322e0ff95/raw/8c6968be0111c7becc485a692162ad100e87d9c7/Object.lua").Object | |
local myapp = js.new(js.global.Vue, Object{ | |
el = "#foo"; | |
template = [[ | |
<div id="foo">{{message}}</div> | |
]]; | |
data = Object{ | |
message = "weeee"; | |
} | |
}) | |
myapp.message = "something else" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment