Skip to content

Instantly share code, notes, and snippets.

View joeldenning's full-sized avatar
🎯
Focusing

Joel Denning joeldenning

🎯
Focusing
View GitHub Profile
import singleSpaAngular1 from 'single-spa-angular1';
import angular from 'angular';
import './app.module.js';
import './routes.js';
const domElementGetter = () => document.getElementById('cool-app');
const angularLifecycles = singleSpaAngular1({
angular,
domElementGetter,
@joeldenning
joeldenning / single-spa-root-application.js
Last active October 5, 2018 22:11
A simple root-application.js file for single-spa
import {declareChildApplication, start} from 'single-spa';
// Register your first application with single-spa. More apps will be registered as you create them
declareChildApplication("cool-app", loadCoolApp, isCoolAppActive);
// Tell single-spa that you're ready for it to mount your application to the DOM
start();
// This is a "loading function"
function loadCoolApp() {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>A single-spa application</title>
</head>
<body>
<div id="cool-app"></div>
<script src="root-application.js"></script>
@joeldenning
joeldenning / gist:834296478d6d727e6b61
Last active January 29, 2016 17:41 — forked from thomseddon/gist:4703968
Auto Expanding/Grow textarea directive for AngularJS
/**
* The MIT License (MIT)
*
* Copyright (c) 2013 Thom Seddon
* Copyright (c) 2010 Google
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell