Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Vue.js Basics Sweeping Vues: Loops, Methods, Directives Vue Devtools

@click methods

Hello, I am trying to make an app that you can click anywhere on the landing page and then it will load a login page(name, email), then once you enter the information you can submit the info then it will say thank you and after seeing nothing but thank you for 5 seconds I want it to go back to the landing page. Here is my code so far on my main.js

Vue.config.devtools = true;
const welcome = new Vue({
  el:'#app',
  data: {
    text: "Welcome",
    img: {src:'logo.png'},
    login: false,
    landing: true,
    checkedIn: false,
  },
  methods: {
    loadInputField: function(){
      //document.getElementById("signIn").style.display = "block";
      this.login = true;
      this.landing = false;
    },
    loadCompletion: function() {
      this.landing =true;
      this.img = false;
      this.checkedIn = true;
      this.login = false;
    }
  }
});