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
// Initialisation de la requête XHR | |
const request = new window.XMLHttpRequest(); | |
// Options de la requête | |
const options = { | |
method: 'GET', | |
url: 'http://myurl.com', | |
async: true | |
}; |
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 myDataStream(observer) { | |
observer.next('Hello'); | |
observer.next('Reactive'); | |
observer.next('World'); | |
} | |
const obsOne = Rx.Observable.create(myDataStream); | |
const subscriptionOne = obsOne.subscribe((data) => { | |
console.log(`Output Obs 1 : ${data}`); | |
}); |
NewerOlder