Skip to content

Instantly share code, notes, and snippets.

@velopert

velopert/app.js Secret

Created January 22, 2017 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velopert/df6240814161436b36620764c2736d20 to your computer and use it in GitHub Desktop.
Save velopert/df6240814161436b36620764c2736d20 to your computer and use it in GitHub Desktop.
// 새로운 뷰를 정의합니다
var app = new Vue({
el: '#app', // 어떤 엘리먼트에 적용을 할 지 정합니다
// data 는 해당 뷰에서 사용할 정보를 지닙니다
data: {
name: 'Vue',
smile: true,
feelsgood: 'https://imgh.us/feelsgood_1.jpg',
feelsbad: 'http://imgh.us/feelsbad.jpg'
}
});
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="app">
<h1>Hello, {{ name }}</h1>
<h2>{{ Date() }}</h2>
<img :src="smile ? feelsgood : feelsbad"/>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment