ã¬ã¤ã
åºæ¬çãªä½¿ãæ¹
- ã¤ã³ã¹ãã¼ã«
- ã¯ããã«
- Vue ã¤ã³ã¹ã¿ã³ã¹
- ãã³ãã¬ã¼ãæ§æ
- ç®åºããããã£ã¨ã¦ã©ããã£
- ã¯ã©ã¹ã¨ã¹ã¿ã¤ã«ã®ãã¤ã³ãã£ã³ã°
- æ¡ä»¶ä»ãã¬ã³ããªã³ã°
- ãªã¹ãã¬ã³ããªã³ã°
- ã¤ãã³ããã³ããªã³ã°
- ãã©ã¼ã å ¥åãã¤ã³ãã£ã³ã°
- ã³ã³ãã¼ãã³ãã®åºæ¬
ã³ã³ãã¼ãã³ãã®è©³ç´°
- ã³ã³ãã¼ãã³ãã®ç»é²
- ããããã£
- ã«ã¹ã¿ã ã¤ãã³ã
- ã¹ããã
- åç & éåæã³ã³ãã¼ãã³ã
- ç¹å¥ãªåé¡ã«å¯¾å¦ãã
ãã©ã³ã¸ã·ã§ã³ã¨ã¢ãã¡ã¼ã·ã§ã³
- Enter/Leave ã¨ãã©ã³ã¸ã·ã§ã³ä¸è¦§
- ç¶æ ã®ãã©ã³ã¸ã·ã§ã³
åå©ç¨ã¨æ§æ
- ããã¯ã¹ã¤ã³
- ã«ã¹ã¿ã ãã£ã¬ã¯ãã£ã
- æç»é¢æ°ã¨JSX
- ãã©ã°ã¤ã³
- ãã£ã«ã¿ã¼
ãã¼ã«
- åä¸ãã¡ã¤ã«ã³ã³ãã¼ãã³ã
- ãã¹ã
- TypeScript ã®ãµãã¼ã
- ãããã¯ã·ã§ã³ç°å¢ã¸ã®é ä¿¡
ã¹ã±ã¼ã«ã¢ãã
- ã«ã¼ãã£ã³ã°
- ç¶æ 管ç
- ãµã¼ããµã¤ãã¬ã³ããªã³ã°
- ã»ãã¥ãªãã£
å é¨
- ãªã¢ã¯ãã£ãã®æ¢æ±
移è¡
- Vue 1.x ããã®ç§»è¡
- Vue Router 0.7.x ããã®ç§»è¡
- Vuex 0.6.x ãã 1.0 ã¸ã®ç§»è¡
ãã®ä»
- ä»ã®ãã¬ã¼ã ã¯ã¼ã¯ã¨ã®æ¯è¼
- Vue.js ã³ãã¥ããã£ã¸åå ãã¾ããã!
- ãã¼ã ã«ä¼ãã
v2.x 以åã®ããã¥ã¡ã³ãã§ãã v3.x ã®ããã¥ã¡ã³ããè¦ããå ´åã¯ãã¡ã
ã«ã¼ãã£ã³ã°
æçµæ´æ°æ¥: 2017å¹´9æ3æ¥
å ¬å¼ã«ã¼ã¿
ã»ã¨ãã©ã®ã·ã³ã°ã«ãã¼ã¸ã¢ããªã±ã¼ã·ã§ã³ (SPA: single page application) ãä½æããå ´åãå ¬å¼ã«ãµãã¼ãããã¦ãã vue-router ã©ã¤ãã©ãª ã使ããã¨ããå§ããã¾ããããã«è©³ããå 容㯠vue-router ã®ããã¥ã¡ã³ããåç §ãã¦ãã ããã
ã¹ã¯ã©ããããã®åç´ãªã«ã¼ãã£ã³ã°
ã¨ã¦ãã·ã³ãã«ãªã«ã¼ãã£ã³ã°ãå¿ è¦ã¨ãã¦ãã¦ããã«æ©è½ã®ã«ã¼ã¿ã©ã¤ãã©ãªã使ç¨ããããªãå ´åã¯ããã®ããã«ãã¼ã¸ã¬ãã«ã®ã³ã³ãã¼ãã³ãã§åçã«æç»ãããã¨ãã§ãã¾ãã
const NotFound = { template: '<p>Page not found</p>' }
const Home = { template: '<p>home page</p>' }
const About = { template: '<p>about page</p>' }
const routes = {
'/': Home,
'/about': About
}
new Vue({
el: '#app',
data: {
currentRoute: window.location.pathname
},
computed: {
ViewComponent () {
return routes[this.currentRoute] || NotFound
}
},
render (h) { return h(this.ViewComponent) }
})
HTML5ã® History API ã¨çµã¿åããããã¨ã§ãã¨ã¦ãåºæ¬ã§ãããå®å ¨ã«æ©è½ããã¯ã©ã¤ã¢ã³ãå´ã®ã«ã¼ã¿ãæ§ç¯ãããã¨ãã§ãã¾ããå®éã«ç¢ºèªããã«ã¯ ãµã³ãã« ãåå¾ãã¦ãã ããã
ãµã¼ããã¼ãã£ã®ã«ã¼ã¿ã¨ã®çµ±å
ãããPage.js ã Director ã®æ§ãªãµã¼ããã¼ãã£ã®ã«ã¼ã¿ã使ãããå ´åãçµ±åããã®ã¯ é常ã«ç°¡å ã§ããããã« Page.js ã使ã£ã ãµã³ãã« ãããã¾ãã