Built with D3js and Cartogram.js. Province and territory data obtained from the Government of Canada's Open Data Portal.
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 MyApp { | |
constructor() { | |
var myUsers = new CustomCollection<User>(); | |
var myMessages = new CustomCollection<Message>(); | |
myUsers.Add(new User()); | |
myMessages.Add(new Message()); | |
var user: User = myUsers.GetFirst(); | |
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
<script type="application/javascript"> | |
function loadJS(file) { | |
// DOM: Create the script element | |
var jsElm = document.createElement("script"); | |
// set the type attribute | |
jsElm.type = "application/javascript"; | |
// make the script element load file | |
jsElm.src = file; | |
// finally insert the element to the body element in order to load the script | |
document.body.appendChild(jsElm); |
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
/** | |
* Illustrates loading external JS libraries via promise | |
*/ | |
class GoogleApiService { | |
static promise = null; | |
async getCoolMapStuff() { | |
const google = await getApi(); |
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 mySaga from 'mySaga'; | |
import { take, fork, cancel } from 'redux-saga/effects'; | |
const sagas = [mySaga]; | |
export const CANCEL_SAGAS_HMR = 'CANCEL_SAGAS_HMR'; | |
function createAbortableSaga (saga) { | |
if (process.env.NODE_ENV === 'development') { | |
return function* main () { |