Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Rodriguez chriseugenerodriguez

  • santa monica
View GitHub Profile
@chriseugenerodriguez
chriseugenerodriguez / country-bounds.ts
Last active Aug 26, 2019
Google Map Country Bounds Javascript
View country-bounds.ts
import { Injectable } from '@angular/core';
@Injectable()
export class POIService {
// LEFT, BOTTOM, RIGHT, TOP
private country_bounding_boxes = [
{'AF': {'Afghanistan': [60.5284298033, 29.318572496, 75.1580277851, 38.4862816432]}},
{'AO': {'Angola': [11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998]}},
{'AL': {'Albania': [19.3044861183, 39.624997667, 21.0200403175, 42.6882473822]}},
{'AE': {'United Arab Emirates': [51.5795186705, 22.4969475367, 56.3968473651, 26.055464179]}},
@chriseugenerodriguez
chriseugenerodriguez / social-share.html
Last active Sep 21, 2018
Angular / Typescript Social Share - Social Media Sharing without all the bulk from social media sdks.
View social-share.html
<ul>
<li>
<a (click)="social('facebook')"><i class="fa fa-facebook"></i></a>
</li>
<li>
<a (click)="social('pinterest')"><i class="fa fa-pinterest"></i></a>
</li>
<li>
<a (click)="social('twitter')"><i class="fa fa-twitter"></i></a>
</li>
@chriseugenerodriguez
chriseugenerodriguez / component.ts
Last active Jul 11, 2017
ngx-translate multi-language meta tags
View component.ts
// TRANSLATE
import { TranslateService, LangChangeEvent } from '@ngx-translate/core';
export class Component implements OnInit {
constructor(public meta: Meta, public title: Title, public translate: TranslateService) {}
ngOnInit(): void {
this.translate.onLangChange.subscribe((event: LangChangeEvent) => {
this.meta.updateTag(
@chriseugenerodriguez
chriseugenerodriguez / nav.component.html
Last active Jun 28, 2017
ngx-translate with localize-router dropdown language change (URL & DOM).
View nav.component.html
<nav class="__nav-menu">
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li [routerLinkActive]="['active']" [routerLinkActiveOptions]="{exact:true}"><a [routerLink]="['/']"> {{ 'Header.HomeLink' | translate }} <span class="sr-only">{{ 'Header.SRCurrent' | translate }}</span></a></li>
</ul>
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="{{ 'Header.Search' | translate }}">
</div>
<button type="submit" class="btn btn-default">{{ 'Header.SubmitBtn' | translate }}</button>
You can’t perform that action at this time.