본문 바로가기
반응형

VUE13

[Vue] route 에서 url parameter 받아오기 VUE : Get URL Parameter Url 에서 파라메터를 가져오는 방법입니다. 1. $route.params https://hello-bryan.tistory.com/search/hello/20 이런 url 이 있을 때, router 설정 { path: '/search/:text/:size', components: { header: Header, default: SearchBody, footer: Footer } } 파라메터 접근은 $route.params 입니다. {{ $route.params }} {{ $route.params.text }} {{ $route.params.size }} --- 2. $route.query 파라메터가 ? 를 통해서 들어올 경우 https://hello-bryan.. 2021. 1. 4.
[Vue] ESLint 사용하기 ESLint 공식 사이트에서는 이렇게 설명하고 있습니다. Find Problems ESLint statically analyzes your code to quickly find problems. ESLint is built into most text editors and you can run ESLint as part of your continuous integration pipeline. Fix Automatically Many problems ESLint finds can be automatically fixed. ESLint fixes are syntax-aware so you won't experience errors introduced by traditional find-and-replace a.. 2021. 1. 1.
[Vue] 예제 #01 카운터(counter) 샘플 소스 + 설명 프로젝트를 직접 생성하지 않고 소스 부분만 보셔도 됩니다. 프로젝트 생성 커맨드 창에서 프로젝트를 생성할 위치로 이동해서 아래 명령어를 실행합니다. 그럼 명령어를 실행한 폴더 아래에 counter 폴더가 생성됩니다. $ vue init webpack-simple counter 그리고 사용하시는 개발 툴로 저 폴더를 열어봅니다. 기본적으로 package.json에 있는 것을 설치해야 하기 때문에, 툴 내 터미널에서 아래 명령어를 날립니다. $ npm install 그리고 vuex 를 사용할 것이기 때문에 터미널에서 아래 명령어로 설치해줍니다. $ npm install vuex 소스 store.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) c.. 2020. 12. 24.
728x90
반응형