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
A (very hacky!) surreal db driver with export/import capability! | |
I had a lot of fun making this! It's for an angular project I'm working on as a hobby. | |
I am by no means a professional, so feedback and suggestions are welcome. | |
Let me know if you have any questions! | |
After injecting the service: | |
constructor(private surreal: SurrealService) | |
You can construct queries like this, returned as an observable: (This is just a simple example) | |
this.surreal |
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 {take} from 'rxjs/operators' | |
import {HttpClient, HttpHeaders} from '@angular/common/http' | |
import {Buffer} from 'Buffer' | |
@Component({ | |
selector: 'surreal', | |
template: ` | |
<ion-header> | |
<ion-toolbar> |
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
// Full-sized Tab (Segment) Swiper Component for use in Ionic/Angular Apps. | |
// The only dependency that you need besides Ionic and Angular is Swiper.js. | |
// It's not a super-fancy component. It's simply an <ion-segment> component linked to a <swiper> component. | |
// When you swipe to a different page, the segment on top will update and vice-versa. | |
// The component makes use of <ion-content> internally, so don't place this component inside an <ion-content> element | |
// Don't forget to import the tab-swiper.module.ts | |
// Implementation in your component | |
<app-tab-swiper selectedTab="Slide 1"> |