JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<div ng-app="test">
    <div ng-view>
    </div>    
</div>

JavaScript

function Ctrl($scope, $location) {
    $scope.openNextPage = function() {
        $location.path('/second');
    }        
}

var module = angular.module('test', [], function($routeProvider) {
        
        $routeProvider.when('/second', {template: '<div>This will not show up</div>', controller: Ctrl});
    
        $routeProvider.otherwise({template: '<div some-directive> <button ng-click="openNextPage()">Switch view to /second</button> </div>', controller: Ctrl});
    });

module.directive('someDirective', function() {
    return {
        transclude: true,
        template: '<div>Transcluded content: <div ng-transclude></div></div>',
        link: function() {

        }
    }
});