<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="alternate" type="application/rss+xml" title="<?= get_bloginfo('name'); ?> Feed" href="<?= esc_url(get_feed_link()); ?>">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,400,300,600,700' rel='stylesheet' type='text/css'>
    <link type="text/css" rel="stylesheet" href="http://fast.fonts.net/cssapi/dae2ada1-fb62-4216-ab20-8072b137a586.css"/>
    <link type="text/css" rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/dist/styles/icons.svg.css"/>
    <?php wp_head(); ?>
    <base href="/history/"></base>
  </head>

<!doctype html>
<html class="no-js" <?php language_attributes(); ?>>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="alternate" type="application/rss+xml" title="<?= get_bloginfo('name'); ?> Feed" href="<?= esc_url(get_feed_link()); ?>">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,400,300,600,700' rel='stylesheet' type='text/css'>
    <link type="text/css" rel="stylesheet" href="http://fast.fonts.net/cssapi/dae2ada1-fb62-4216-ab20-8072b137a586.css"/>
    <link type="text/css" rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/dist/styles/icons.svg.css"/>
    <?php wp_head(); ?>
    <?php if (is_page_template('template-timeline.php') || is_page_template('template-stories.php')) { 
      $parts = explode('/', rtrim($_SERVER['REQUEST_URI'], '/'));
      $base = $parts[1];
      ?>
      <base href="/<?php echo $base; ?>/"></base>
    <?php } ?>
  </head>

Fix the 'base' attribute for ng-apps
Fix the 'base' attribute for ng-apps
