Getting Started with Meteor.js JavaScript Framework - Second Edition by Isaac Strack
Author:Isaac Strack [Strack, Isaac]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2015-06-30T00:00:00+00:00
First, we check to see whether cats and cats.items are not undefined/null.
Next, we iterate over all the values in items (items is an array, if you recall). To make it easier, we declare the variable itm = cats.item[i].
Then, we add the Lendee property, checking to see whether the item is lent to anyone with the LentTo property. If it isn't (if LentTo doesn't exist), we'll assign the "free" string instead.
Likewise, if LentTo exists, we declare the red bootstrap label class, label-important, as the LendClass. If the item is not lent out, we'll use the green bootstrap class, label-success, instead.
Finally, with our new Lendee and LendClass properties assigned, we'll return cats.items. We didn't save these properties to our data collection. This is because they're not part of the data collection. They're used by the Blaze to modify the look and feel of our UI, so we'll only need to make them available via the template helper.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Content Management | Programming |
User Experience & Usability | User Generated Content |
Web Design | Web Marketing |
Web Services | Website Analytics |
Hello! Python by Anthony Briggs(9915)
The Mikado Method by Ola Ellnestam Daniel Brolund(9778)
Dependency Injection in .NET by Mark Seemann(9339)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7778)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Svelte with Test-Driven Development by Daniel Irvine(7159)
Test-Driven Development with PHP 8 by Rainier Sarabia(6886)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(6756)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(6532)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Web Development with Django by Ben Shaw Saurabh Badhwar(6219)
React Application Architecture for Production by Alan Alickovic(5945)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5806)
Kotlin in Action by Dmitry Jemerov(5063)
Audition by Ryu Murakami(4583)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4452)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4317)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4298)
Functional Programming in JavaScript by Mantyla Dan(4038)
