JSFiddle - React, Tailwind, and code Playground
JavaScript
(function(){
function myFunction($view, $http){
var self = this;
$http({method: 'POST', url: '/someurl'}).
success(function(data, status, headers, config) {
var jData = data;
}).
error(function(data, status, headers, config) {
});
$view.availableData = {
cols:{ID:'ID', Date:'Date'},
rows:{data:jData},
options:{}
};
myFunction.MODULE = angular.module('myFunction',function($routeProvider,$locationProvider){
myFunction.ROUTER = $routeProvider;
$routeProvider.when('',{
template:'index.html'
});
$routeProvider.when('/page2',{
template:'index2.html'
});
});
})()