“Native Code” message in return of VueJS method

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.


You forgot the parenthesis mate:

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *