Leanpub Header

Skip to main content

Practical Vue.js

Master this simple yet powerful framework to create reactive web interfaces with practical examples.

Current Version: 2

Minimum price

$21.99

$25.99

You pay

$25.99

Authors earn

$20.79
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
102
Readers
123
Pages
15,230Words
About

About

About the Book

This work presents the Vue.js framework to create web interfaces. Its simplicity to create to create components and managing data binding make web systems development a powerful and simple task.

The Vue.js stands out for its requirements simplicity compared to any complex framework.

Share this book

Author

About the Authors

Daniel Schmitz

Daniel Schmitz is a software developer and writer. He's originally from Brazil and has published several books in Portuguese/English.

Daniel Pedrinha Georgii

Contents

Table of Contents

1.Introduction

  1. 1.1Tech used
  2. 1.2Node installation
  3. 1.3Using npm
  4. 1.4Some bits about RESTfull

2.Meeting Vue.js

  1. 2.1jsFiddle
  2. 2.2Setting up jsFiddle for Vue
  3. 2.3Hello World, vue
  4. 2.4Two way data-bind
  5. 2.5Creating a list
  6. 2.6Detecting changes to the Array
  7. 2.6.1Using v-bind:key
  8. 2.6.2Using set
  9. 2.6.3How to remove a item
  10. 2.6.4Object loops
  11. 2.7Events and methods
  12. 2.7.1Changing the event propagation
  13. 2.7.2Keyboard modifiers
  14. 2.8Reactive design
  15. 2.9Creating a task list
  16. 2.10Vue’s life cycle events
  17. 2.11More about Data-bind
  18. 2.11.1Single Data-bind
  19. 2.11.2Data-bind with HTML
  20. 2.11.3Attribute data-bind
  21. 2.11.4Expressions
  22. 2.12Filters
  23. 2.12.1uppercase
  24. 2.12.2lowercase
  25. 2.12.3currency
  26. 2.12.4pluralize
  27. 2.12.5json
  28. 2.13Directives
  29. 2.13.1Arguments
  30. 2.13.2Modifiers
  31. 2.14Directive shortcuts (Shorthands)
  32. 2.15Changing styles
  33. 2.16Using the v-if conditional
  34. 2.17Showing or hiding a code block
  35. 2.18v-if vs v-show
  36. 2.19Forms
  37. 2.19.1Check-box
  38. 2.19.2Radio
  39. 2.19.3Select
  40. 2.19.4Input attributes
  41. 2.20Conclusion

3.Creating components

  1. 3.1Vue-cli
  2. 3.2Creating the first project with vue-cli
  3. 3.3Executing the project
  4. 3.4The project structure
  5. 3.5The packages.json file
  6. 3.6Components and .vue files
  7. 3.7Creating a new component
  8. 3.8Adding properties
  9. 3.8.1camelCase vs. kebab-case
  10. 3.8.2Validations and default values
  11. 3.9Slots and component composing
  12. 3.9.1Using multiple slots
  13. 3.10Events and communication between components
  14. 3.10.1Passing parameters
  15. 3.11Reorganizing the project
  16. 3.12Adding styles
  17. 3.13Changing the Header
  18. 3.14Changing the Footer
  19. 3.15Changing the App Content

4.Vue Router

  1. 4.1Installing the Vue Router
  2. 4.2Setting up
  3. 4.3Setting up the router.map
  4. 4.4Setting up the router-view
  5. 4.5Creating new components
  6. 4.6Creating a menu
  7. 4.6.1Passing parameters on the link
  8. 4.7Active class
  9. 4.8Filtering routes by login

5.Vue Resource

  1. 5.1Testing the Ajax access
  2. 5.2Request methods
  3. 5.3Working with resources

6.Creating a blog with Vue, Express and MongoDB

  1. 6.1Creating the RESTful server
  2. 6.2The MongoDB database
  3. 6.3Creating the project
  4. 6.4Project structure
  5. 6.5Setting up the MongoDB models.
  6. 6.6Setting up the Express server
  7. 6.7Testing the server
  8. 6.8Testing the API without Vue

7.Implementing the Blog with Vue

  1. 7.1Setting up the packages.json file
  2. 7.2Installing Vue and Materialize package
  3. 7.3Setting up the router and resources
  4. 7.4Setting up the main app interface
  5. 7.5Getting Posts
  6. 7.6Setting up the Vue Validator
  7. 7.7Logging-in
  8. 7.8Authentication Token
  9. 7.9Creating Post
  10. 7.10Log-out
  11. 7.11Refactoring the home page

8.Mixins

  1. 8.1Creating mixins
  2. 8.2Conflicting

9.Plug-ins

  1. 9.1Creating a plug-in

10.Next Steps

  1. 10.1Vuex
  2. 10.2Vue.js in Twitter
  3. 10.3Vue Awesome

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub