Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Build Applications with Meteor

You're reading from   Build Applications with Meteor Isomorphic JavaScript web development

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787129887
Length 388 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Dobrin Ganev Dobrin Ganev
Author Profile Icon Dobrin Ganev
Dobrin Ganev
Arrow right icon
View More author details
Toc

Building the Modal


In our app, we want to open a popup/modal on a user action and then close it either by clicking on the close button inside the modal or anywhere outside of it. 

Let's build a sample Modal app and see how it'll work in a step-by-step fashion. Later, we can implement it in the Kanban app. Open the terminal and create a modal app: meteor create modal. To save on typing and installing packages one by one, copy and replace this package.json file with the one that was generated by Meteor. Then, run  npm install:

{
 "name": "modal",
 "private": true,
 "scripts": {
 "start": "meteor run"
},
 "dependencies": {
 "babel-runtime": "6.18.0",
 "classnames": "^2.2.5",
 "meteor-node-stubs": "~0.2.0",
 "react": "^15.4.2"
},
 "babel": {
  "plugins": [
  "transform-class-properties"
  ]
},
 "devDependencies": {
 "babel-plugin-transform-class-properties": "^6.19.0"
 }
}

To keep it clear and descriptive, we will create the Modal app with just four files. Delete all the default files in the client...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images