Last active
September 29, 2017 19:13
-
-
Save PaquitoSoft/24b324736aa3d4f32aa63b59eaa58c8c to your computer and use it in GitHub Desktop.
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 routingConfig from './config/routing.js'; | |
import Router from './components/shared/router/router.js'; | |
const app = document.createElement('div'); | |
app.innerHTML = ` | |
<div class="header clearfix"> | |
<h3 class="text-muted"> | |
<a href="/">Podcaster</a> | |
<div class="spinner hidden"> | |
<div class="double-bounce1"></div> | |
<div class="double-bounce2"></div> | |
</div> | |
</h3> | |
</div> | |
<div class="main-content"></div> | |
`; | |
Router.setup({ | |
routingConfig, | |
mountingElement: app.querySelector('.main-content'), | |
loadingCallback: function(appSpinner, isLoading) { | |
const operation = isLoading ? 'remove' : 'add'; | |
appSpinner.classList[operation]('hidden'); | |
}.bind(null, app.querySelector('.spinner')) | |
}); | |
document.getElementById('root').appendChild(app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment