JSFiddle - React, Tailwind, and code Playground
by blashadow
HTML
<div ng-app='nice'>
<div ng-controller='main'></div>
</div>
<script>
var app = angular.module('nice',[])
app.factory('test',function($http,$q){
var def = $q;
return {
get:function(){
return $http.post("http://fiddle.jshell.net/_display/").then(function(data){
return data;
},function(data){
return data;
});
}
}
});
app.controller('main',function(test){
test.get().then(function(data){
console.log(data)
alert("Works nice " + data)
},function(){
alert("Error");
})
});
</script>