Skip to content

Commit

Permalink
Added the vue component communication examples for book
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua1988 committed Dec 15, 2017
1 parent 95c90d4 commit b03c2c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 예제코드/06_뷰 컴포넌트 통신/06-1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<my-component2></my-component2>
</div>

<script src="https://unpkg.com/vue@2.4.4/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.2/dist/vue.js"></script>
<script>
// 첫번째 컴포넌트 내용
var cmp1 = {
Expand Down
2 changes: 1 addition & 1 deletion 예제코드/06_뷰 컴포넌트 통신/06-2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<child-component v-on:show-log="printText" v-bind:passed-data="message"></child-component>
</div>

<script src="https://unpkg.com/vue@2.4.4/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.2/dist/vue.js"></script>
<script>

Vue.component('child-component', {
Expand Down
4 changes: 2 additions & 2 deletions 예제코드/06_뷰 컴포넌트 통신/06-3/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script>

Vue.component('child-component', {
props: ['상위 컴포넌트의 데이터 속성(프롭스 속성 명)']
props: ['프롭스 속성 이름']
});

</script>

<body>

<child-component v-bind:프롭스 속성="상위 컴포넌트의 데이터 속성"></child-component>
<child-component v-bind:프롭스 속성 이름="상위 컴포넌트의 data 속성"></child-component>

</body>

0 comments on commit b03c2c6

Please sign in to comment.