This file contains 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
onSubmit(name, email, message) { | |
this._emailService.sendEmail({ | |
from: 'Mailgun Sandbox <postmaster@sandboxXXXXXXXXXXXXXXXXXXXXX.mailgun.org>', | |
to: email, | |
name: name, | |
text: message, | |
}) | |
.subscribe( | |
() => {}, | |
err => console.log(err) |
This file contains 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 { Injectable } from '@angular/core'; | |
import { Http, Response } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
@Injectable() | |
export class EmailService { | |
constructor(private http: Http) { } | |
sendEmail(data) { |
This file contains 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
function convertToRoman(num) { | |
var romanArray = []; | |
while (num <= 3999 && num > 0) { | |
if (num >= 1000 && num <= 3999) { | |
romanArray.push("M"); |
This file contains 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
function whatIsInAName(collection, source) { | |
var arr = []; | |
for (var i = 0; i < collection.length; i++) { | |
var collectionObject = collection[i]; | |
//console.log(collectionObject); | |
//loop through collection array to look at the objects. Put the collection objects into a variable called collectionObject | |
var perfectMatch = true; | |
//set this variable to true. This will be changed to false when next loop fails. |
NewerOlder