This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| var directionsService = new google.maps.DirectionsService(); | |
| var request = { | |
| origin : 'Melbourne VIC', // a city, full address, landmark etc | |
| destination : 'Sydney NSW', | |
| travelMode : google.maps.DirectionsTravelMode.DRIVING | |
| }; | |
| directionsService.route(request, function(response, status) { | |
| if ( status == google.maps.DirectionsStatus.OK ) { |
| /** Custom Icons **/ | |
| ion-icon { | |
| &[class*="ci-"] { | |
| // Instead of using the font-based icons | |
| // We're applying SVG masks | |
| mask-size: contain; | |
| mask-position: 50% 50%; | |
| mask-repeat: no-repeat; | |
| background: currentColor; | |
| width: 1em; |
| ionViewDidEnter(){ | |
| this.initFacebookAds(); | |
| }; | |
| ionViewDidLeave(){ | |
| if (!this.platform.is('cordova')) return; | |
| FacebookAds.removeNativeAd('112713919406063_117179372292851'); | |
| }; | |
| initFacebookAds() { |
| const mongoose = require('mongoose'); | |
| const mapObject = (Obj) => { | |
| if (Array.isArray(Obj)) { | |
| } else if(typeof Obj === 'object') { | |
| } else { | |
| } |
| const isArray = (str) => { | |
| console.log('str', str); | |
| if (str.indexOf('[].') > -1) { | |
| const split = str.split('[].') | |
| console.log('split', split); | |
| return { | |
| name: split[0], | |
| value: split[1] | |
| } | |
| } |
| import mongoose from 'mongoose' | |
| import traverse from 'traverse' | |
| const bodyToLocalized = (body, fields, lang = 'en') => { | |
| fields.forEach(field => { | |
| if (field in body) { | |
| body[field + '.' + lang] = body[field] | |
| delete body[field] | |
| } | |
| }) |
| import Router from 'koa-router' | |
| import Tour from './../models/tour' | |
| import TourController from './../controllers/tour' | |
| import setLang from './../middleware/setLang' | |
| import { toLocalized, toLocalized2, bodyToLocalized, localizedToBody } from './../helpers/i18n' | |
| const router = new Router() | |
| /* |
| https://medium.com/@zurfyx/building-a-scalable-node-js-express-app-1be1a7134cfd | |
| https://medium.com/@xoor/building-a-node-js-rest-api-7-request-validation-43c144300d06 |
| { | |
| "env": { | |
| "node": true, | |
| "es6": true | |
| }, | |
| "ecmaFeatures": { | |
| "arrowFunctions": true, | |
| "blockBindings": true, | |
| "classes": true, | |
| "defaultParameters": true, |