Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div id="app">
- <header>
- <div class="grid">
- <div class="logo">
- <input type='text' placeholder="YouCompany" class="logo">
- </div>
- <div class="nav">
- <router-link class="btn" to="/">Home</router-link>
- <router-link class="btn" :to="{ name: 'table' }">Table</router-link>
- <router-link class="btn" :to="{ name: 'application' }">Apply</router-link>
- </div>
- </div>
- </header>
- <section class="content">
- <router-view></router-view>
- </section>
- <footer></footer>
- </div>
- </template>
- <script>
- import axios from 'axios'
- export default {
- data () {
- return {
- users: [null],
- endpoint: '/src/users.json'
- }
- },
- created() {
- this.getAllUsers();
- },
- methods: {
- getAllUsers() {
- axios.get(this.endpoint)
- .then(respinse => {
- this.users = response.data;
- })
- .catch(error => {
- console.log('-----error-------');
- console.log(error);
- })
- }
- }
- }
- </script>
- <style lang="sass" scoped>
- @import 'assets/scss/main.scss';
- </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement