Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
83
rated 0 times [  88] [ 5]  / answers: 1 / hits: 19407  / 6 Years ago, tue, march 27, 2018, 12:00:00

when using the following code:
https://github.com/iamshaunjp/vuejs-playlist/blob/lesson-18/src/App.vue



My browser displays function () { [native code] } where it should display heeey cowboy.



Any idea what's going on? I'm working from the tutorial here, using the CLI, and everything is identical to the provided files.


More From » vue.js

 Answers
23

You forgot the parenthesis mate:



<template>
<div>
<h1>{{ title }}</h1>
<p>{{ greeting() }}</p>
</div>
</template>


The error is in greeting, you forgot to add these parenthesis after it (), that's how you call a javascript function


[#54837] Sunday, March 25, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iliana

Total Points: 246
Total Questions: 109
Total Answers: 82

Location: Palestine
Member since Tue, Jul 20, 2021
3 Years ago
;