vue.js - Html attributes, Migrating to VueJs 2 -
i want migrate vue.js application 2.0 version. application single-file webpack project , use "html attribute" setting param app.
i setting app that:
<body> <app url="https://api.com" env="dev"></app> </body>
i attribute in vue.js 1.0 that
export default { props: ['env'], data () { return { } }, computed: { calling: function () { console.log(this.env) } } }
my problem simple, in vue.js 1.0 attributes "this.attribute" in vue.js 2 code return undefined value.
how can receive html attributes in vue.js 2.0 ?
Comments
Post a Comment