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, OnInit, NgZone } from "@angular/core"; | |
const firebase = require("nativescript-plugin-firebase"); | |
import { AppService } from "./app.service"; | |
@Component({ | |
selector: "ns-app", | |
templateUrl: "./app.component.html" |
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
ERROR: Error{rejection: undefined, promise: ZoneAwarePromise{__zone_symbol__state: 0, __zone_symbol__value: undefined}, zone: Zone{_properties: Object{ProxyZoneSpec: ...}, _parent: Zone{_properties: ..., _parent: ..., _name: ..., _zoneDelegate: ...}, _name: 'Pr | |
oxyZone', _zoneDelegate: ZoneDelegate{_taskCounts: ..., zone: ..., _parentDelegate: ..., _forkZS: ..., _forkDlgt: ..., _forkCurrZone: ..., _interceptZS: ..., _interceptDlgt: ..., _interceptCurrZone: ..., _invokeZS: ..., _invokeDlgt: ..., _invokeCurrZone: ..., _ | |
handleErrorZS: ..., _handleErrorDlgt: ..., _handleErrorCurrZone: ..., _scheduleTaskZS: ..., _scheduleTaskDlgt: ..., _scheduleTaskCurrZone: ..., _invokeTaskZS: ..., _invokeTaskDlgt: ..., _invokeTaskCurrZone: ..., _cancelTaskZS: ..., _cancelTaskDlgt: ..., _cancel | |
TaskCurrZone: ..., _hasTaskZS: ..., _hasTaskDlgt: ..., _hasTaskDlgtOwner: ..., _hasTaskCurrZone: ...}}, task: ZoneTask{_zone: Zone{_properties: ..., _parent: ..., _name: ..., _zoneDelegate: ...}, runCount: 0, _zoneDelegates: null, _state: |
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 simpleGit = require('simple-git')(); | |
module.exports = () => { | |
return Promise.all([ | |
getRemoteUrl(), | |
getCurrentBranch(), | |
getLatestCommit() | |
]).then(res => { | |
return { | |
remote: res[0], |
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 { | |
inject, | |
TestBed | |
} from '@angular/core/testing'; | |
import { AppComponent } from './app.container'; | |
import { AppSandbox } from '../../core.sandbox'; | |
import { Observable } from 'rxjs/Observable'; | |
describe('App', () => { |
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
class SurveyListController { | |
surveys: ISurvey[]; | |
search$: Subject<string> = new Subject<string>(); | |
// subject used to clean up the observable subscriptions. | |
private onDestroy$: Subject<any> = new Subject<any>(); | |
/** | |
* hook in-to the Angular onInit event |
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
// Filter | |
public class CorsFilter : ActionFilterAttribute | |
{ | |
public override void OnActionExecuted(ActionExecutedContext filterContext) | |
{ | |
base.OnActionExecuted(filterContext); | |
var response = filterContext.RequestContext.HttpContext.Response; | |
// Add header to response | |
response.AddHeader("Access-Control-Allow-Origin", "*"); |
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
// OLD CODE WITH INLINE REMARKS | |
public class TestController : Controller | |
{ | |
[HttpOptions] | |
public ActionResult Xlsx() | |
{ | |
// Catches and authorises pre-flight requests for /data/xlsx from remote domains | |
// Remark: Don't touch Response / Request object directly inside the Controller | |
Response.AddHeader("Access-Control-Allow-Origin", "*"); |