vue2-demo | Vue 基于 Genesis TS Vuex 实现的 SSR demo | State Container library
kandi X-RAY | vue2-demo Summary
kandi X-RAY | vue2-demo Summary
Vue 基于 Genesis + TS + Vuex 实现的 SSR demo
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vue2-demo
vue2-demo Key Features
vue2-demo Examples and Code Snippets
Community Discussions
Trending Discussions on vue2-demo
QUESTION
I want to update a placeholder (currentUsername) asynchronously with an actual value after loading/rendering the page.
I tried following a sample project (https://github.com/jackfranklin/vue2-demo-proj), but I can't correlate it with my setup. Using vuejs 2.0. I can see the event is triggered, the call is made and something's returned, I've got no errors on my Chrome console, but nothing is updated in the UI. Why is that?
1) html file:
...ANSWER
Answered 2017-Apr-13 at 12:53The if isn't re-evaluated when you get the response, so the placeholder isn't included in the page.
This line DOES update it, but it's just not shown: this.currentUsername = data;
Change it to something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vue2-demo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page