JSFiddle - React, Tailwind, and code Playground
by xzlstc415
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.js"></script>
<div ng-controller="mainCtrl">
<a href="/single">single</a>
<a href="/archive">archive</a>
<div ng-view></div>
</div>
</div>
CSS
</style>
<base href="/">
<style>
JavaScript
var app = angular.module("myApp", [
"ngRoute"
]);
app.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
$routeProvider
.when("/archive", {
template: "<p>archive</p>"
})
.when("/single", {
template: "<p>single</p>"
})
.otherwise({
redirectTo: "/archive"
});
$locationProvider.html5Mode(true);
}]);
app.controller("mainCtrl", function mainCtrl($scope, $location) {
$scope.$location = $location;
});