This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| import { NavController, NavParams } from 'ionic-angular'; | |
| import { MessageProvider } from '../../providers/message-provider/message-provider'; | |
| class Card { | |
| public Name:string; | |
| constructor(name: string) { | |
| this.Name = name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Verify = require('../models/verify'); | |
| var now = new Date(); | |
| now.setDate = (now.getHours() - 1) | |
| Verify.find( //query today up to tonight | |
| {"created_on": {"$gte": now }}) | |
| Throws an error of type mismatch, I also tested and see the that the $lt and $gte takes on Date types. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I am trying to retrieve something from localstorage but would use that to decide what is served, | |
| so until that happens execution cannot continue. | |
| I feel I am doing something wrong as the getKey property of the LocalStorage retunrs a promise | |
| import { Component, ViewChild } from '@angular/core'; | |
| import { ionicBootstrap, Platform, Nav, LocalStorage , Storage } from 'ionic-angular'; | |
| import { StatusBar, Splashscreen, Push } from 'ionic-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Please which approach is the best for modelling mongo data, I am about to create a big API for an Ionic app | |
| Using Relationships like RDBMS | |
| patron | |
| { | |
| _id: "joe", | |
| name: "Joe Bookreader" | |
| } | |
| address | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scope.$on('$ionicView.enter', function(){ | |
| vm.errorMessage = $stateParams.errorMessage; | |
| //if persisted User object exist then go to home page, means user has logged in before | |
| if(PersistDataService.getObject(user) != undefined){ | |
| $state.go('home') | |
| } | |
| vm.doLogin = function(e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Gist Test |