You probably shouldn't.
I talk a lot of nonsense and the reason this talk exists is due to my stubbornness
of sticking with this stack even when things got tough.
Think you can do a better job. Get in touch with me
npm install -g phonegap
phonegap create edinburghjs com.edinburghjs.meetup EdinburghJS
phonegap platform add ios
supported platforms: ios, android, blackberry, windows phone 7/8, FirefoxOS, fireos
phonegap local plugin add https://github.com/mallzee/phonegap-facebook-plugin.git
Contacts, Network-Information, Splashscreen, StatusTap, FacebookConnect, Camera, Geolocation, FileAPI, Vibration, PushNotifications, and many more
npm install -g yo
npm install -g generator-angular
yo angular edinburghjs
npm install grunt-angular-phonegap
phonegap local plugins add https://github.com/apache/cordova-plugin-device
function setDeviceType() {
var model = device.model; // device is injected by the phonegap plugin
if (model.match(/iPhone/) || model.match(/iPod/)) {
$rootScope.device = 'mobile';
} else if (model.match(/iPad/)) {
$rootScope.device = 'tablet';
}
}
<div ng-if="device == 'tablet'">[ADD MORE STUFF IN HERE]</div>
.movingItem { transform: translateZ(0); }
.product.ng-enter,
.product.ng-leave {
-webkit-transition:0.5s ease all;
-moz-transition:0.5s ease all;
-o-transition:0.5s ease all;
transition:0.5s ease all;
}
.product.ng-enter,
.product.ng-leave.ng-leave-active {
opacity: 0;
}
.product.ng-leave,
.product.ng-enter.ng-enter-active {
opacity: 1;
}
$animate.enter(element, parent, sibling, callback)
api.query(q, function (products) {
// Merge updates and remove
_.each(userProducts, function (p) {
var found = _.find(products.records, {'_id': p._id});
_.remove(products.records, {'_id': p._id});
if (found) {
_.merge(p, found);
} else {
p.__remove = true;
}
page++;
});
_.remove(userProducts, {'__remove': true});
_.each(products.records, function (newProduct) {
userProducts.push(newProduct);
});
localStorage.setItem('user.products', userProducts);
});
<div class="friends">
<a class="friend" ng-repeat="contact in contacts">
<h2 ng-bind="contact.name"></h2>
<img ng-src="contact.profile_image_url" />
</a>
</div>
<div class="friends">
<a class="friend" bindonce ng-repeat="contact in contacts">
<h2 bo-text="contact.name"></h2>
<img bo-src="contact.profile_image_url" />
</a>
</div>
<button ng-class="{'active': !productsFilter.isEmpty()}" ng-click="$state.go('filters')"></button>
<button ng-class="{'active': !productFilter.empty}" ng-click="$state.go('filters')"></button>
productFilter.empty = false;
function updateFilter() {
// Workout if the filters empty when and changes are made
...
empty = (filter.length > 0);
}
<div class="price" ng-bind="product.price | currency:'£'"></div>
<div class="price" ng-bind="product.price"></div>
angular.foEach(products, function(product) {
product.price = $filter('currency')(product.price, '£');
}
scope.$on('$destroy', function () {
item.element.remove();
item.off('click');
});