Giter Club home page Giter Club logo

vue_crash_todolist's Introduction

Vue Crash Course (TodoList)

This is the code for the crash course on YouTube

Quick Start

# Install dependencies
npm install

# Serve on localhost:8080
npm run serve

# Build for production
npm run build

vue_crash_todolist's People

Contributors

0sama avatar bradtraversy avatar dependabot[bot] avatar jonasbn avatar lusarz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue_crash_todolist's Issues

Second Time Adding - Duplicate Key

Duplicate keys detected: '201'. This may cause an update error.

found in

---> <Todos> at src/components/Todos.vue
       <Home> at src/views/Home.vue
         <App> at src/App.vue
           <Root>

Templates are not getting loaded

For some reasons my component templates are not getting loaded.

Module Warning (from ./node_modules/eslint-loader/index.js):
error: 'Todos' is defined but never used (no-unused-vars) at src/App.vue:8:8:
   6 | 
   7 | <script>
>  8 | import Todos from './components/Todos';
     |        ^
   9 | 
  10 | export default {
  11 |   name: 'app',


1 error found.

I am not sure why is this problem. I guess vue-template-loader is not working.. How do I get rid off this?

Kindly help me in this.

FYI: I am using Linux Mint 19 Tara

[ERROR] Unexpected console statement

I'm having this error even tho i did every step correct
./src/App.vue Module Error (from ./node_modules/eslint-loader/index.js): error: 'res' is defined but never used (no-unused-vars) at src/App.vue:30:15: 28 | axios 29 | .delete(https://jsonplaceholder.typicode.com/todos/${id}`)

30 | .then(res => (this.todos = this.todos.filter(todo => todo.id !== id)))
| ^
31 | .catch(err => console.log(err));
32 | },
33 | addTodo(newTodo) {`
Screenshot from 2020-02-02 21-00-42

res not used in deleteTodo method compile error

After creating the app, I installed the vue router, then installed axios, then copied in these source files. I got an error in the home.vue file at line 27. It said that res is not used. In a comment by Michael Gtz at around 4/30/2020, he said to change the code to look like this:

deleteTodo(id) { axios.delete(`https://jsonplaceholder.typicode.com/todos/${id}`) .then(this.todos = this.todos.filter(todo => todo.id !== id)) .catch(err => console.log(err));

and it resolved the error.

Remove /#/ from URL

If you're new to Vue and are needing to remove /#/ from the URL I've found this can be done in router.js by adding the below to the Router:

src/router.js:

mode: 'history',
hash: false,

versions:

"dependencies": {
    "axios": "^0.20.0",
    "core-js": "^3.6.5",
    "uuid": "^8.3.1",
    "vue": "^2.6.11",
    "vue-router": "^3.4.6"
  },

CORS errors

Hi everyone. Thank you very much Traversy for the course!
It is a quick and simple introduction to Vuejs and serves as a strong foundation for future learning.
I am facing a slight problem with jsonplaceholder however.
I constantly get cors errors and been bogging the head to fix it.
If anyone of the community could have a look at it I would very much appreciate it.
Test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.