JSFiddle - React, Tailwind, and code Playground

by dingen2010

HTML

<div ng-controller="MainCtrl" ng-app=app>
<a href="/test">testing</a>

    <script type=text/ng-template id=details.html>
        blabla
    </script>
    <script type=text/ng-template id=notfound.html>
        nf
    </script>
</div>

JavaScript

var app = angular.module('app');

app.controller('MainCtrl', function ($scope) {
    console.log('main ctrl');

});
app.controller('mycontroller', function ($scope) {
    console.log('hi there');
});



app.config(function ($routeProvider) {
    $routeProvider.when("/test", {
        templateUrl: "details.html",
        controller: "mycontroller"
    })
        .otherwise({
        templateUrl: "notfound.html"
    });
});