Instantly share code, notes, and snippets.

View test.service.ts
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class TestService {
private testUrl = '/some/test/url';
constructor(private http: HttpClient) { }
View ViewController.m
@interface ViewController ()
@property (nonatomic) GMSMapView *mapView;
@end
@implementation ViewController
#pragma mark - UIViewController
- (void)viewDidLoad {
View postWrapper.m
-(void) get:(NSString *)rest withParams:(NSDictionary*)params
completion:(void (^)(id))completionBlock
{
NSString *curUrl = [self.constant.url stringByAppendingString:rest];
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
View pauseEvent
document.addEventListener("pause", App.pauseEvent, false);
pauseEvent: function(){
navigator.geolocation.watchPosition(
function(pos){
App.latlngs.push(new L.LatLng(pos.coords.latitude, pos.coords.longitude));
},
function(err){
alert('Error:' + err);
},
View 1question.txt
Hi,
I'm trying to send a mongodb schema from client to the server. I put the server (server.js) and client (client.js) codes above. When I press the button on the client side, I log the incoming data into the console.
In the console output what I have is:
{
field1: `container field`,
subSchema: []
}