나는 vue를 배우려고 노력하고 있지만 아무것도 작동하지 않습니다. 이것은 내가 지금 시도한 다섯 번째 튜토리얼이며 내가 뭘 잘못하고 있는지 정말 모르겠습니다.
다음 코드를 렌더링 할 때 의도 한 콘텐츠가 아닌 템플릿 태그가 표시됩니다.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<title>Learning Vue.js</title>
</head>
<body>
<div id="app">
<input type="text" v-model="name" />
<p>Hello {{ name }}</p>
</div>
<script>
new Vue({
el: '#app',
data() {
return {
name: 'John'
};
}
});
</body>
</html>
누구든지 이것이 작동하지 않는 이유를 이해하도록 도와 주시겠습니까? 지난 한 달 동안이 문제가 발생했으며 해결책을 찾을 수 없습니다. Linux 컴퓨터에서 Firefox를 사용하고 있으며 동일한 문제로 Opera 및 Brave 브라우저에서도 사용해 보았으므로 내 코드라고 의심됩니다.
위의 코드 스 니펫에서는 스크립트 태그를 닫지 않았습니다. 태그를 닫은 후 코드 :
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<title>Learning Vue.js</title>
</head>
<body>
<div id="app">
<input type="text" v-model="name" />
<p>Hello {{ name }}</p>
</div>
<script>
new Vue({
el: '#app',
data() {
return {
name: 'John'
};
}
});
</script>
</body>
</html>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다