Skip to content

Unwrap the Angular Routing #92

@thehabes

Description

@thehabes

This is in relation to app.js, which sets the routing for the app.

Most of this file can go away and be replaced with YAML and Jekyll Front Matter syntax on the HTML page. For example https://rerum.io/#/about is routed like this in app.js

var rerum = angular.module('rerum', ['ui.bootstrap', 'ngRoute', 'ngAnimate','ngSanitize', 'angular-loading-bar', 'cfp.hotkeys', 'utils']);
rerum.config(['$routeProvider', '$locationProvider',
    function ($routeProvider, $locationProvider) {
        ...
        .when('/about', {
               templateUrl: 'app/about/about.html'
         })
   }])

That is a fair amount of overhead for a static community site. Instead, all that is needed is an /about directory or a /public/about.html file with some YAML at the top.

---
title: About Page
permalink: /about
---

Do this for all static pages that are routed to by this app.js file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions