UNPKG

generator-base-polymer

Version:

Polymer basic skeleton for webapp development. With RequireJS, Bootstrap, Sass and templating with Jade. Routing by Page.js.

24 lines (21 loc) 371 B
define(['page', 'jquery'], function(Page, $) { 'use strict'; Page.base(''); Page('/', index); Page(); function index(ctx) { if (ctx.hash !== '') { Page(ctx.hash); } else { landing(); } } function landing() { loadComponent('modules/main.html'); } function loadComponent(path) { $.get(path, function(data) { $('#app').html(data); }); } });