[rt-devel] [rt-users] New UX for RT: REST 2.0, json, and what?

BÁLINT Bekény balint.bekeny at docca.hu
Fri Apr 4 02:42:22 EDT 2014


Hi Alex,

We will manage the code on github soon.

Now, it's really just an AngularJS "hello world":

<!doctype html>
<html ng-app>
    <head>
<title>AngularJS test: get ticket via RESTv2</title>
<script src="
https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js
"></script>
<script>
    function GetTicket($scope, $http) {
      $scope.addTicket = function() {
var tid = $scope.TicketId;
$http.get("https://lajos:asdfasdf@dox4.docca.hu/REST/2.0/ticket/" + tid).
    success(function(data) {
            $scope.ticketdata = data;
    });
      };
    }
</script>
    </head>

    <body>
<div ng-controller="GetTicket">
    <form ng-submit="addTicket()">
    <input ng-model="TicketId">
    <p>test id : {{TicketId}}</p>
    <p>ID : {{ticketdata.id}}</p>
    <p>LastUpdated : {{ticketdata.LastUpdated}}</p>
    <p>Owner : {{ticketdata.Owner.id}}</p>
</form>
</div>
    </body>
</html>

--
Bekeny

On Thu, Apr 3, 2014 at 11:38 PM, Alex Vandiver <alexmv at bestpractical.com>wrote:

> On Thu, 2014-04-03 at 23:33 +0200, akos.torok at docca.hu wrote:
>
> > Since then we've got some "hello world" thing:
> > - an angular client asks the user for a ticket id (via ng-model input
> > field),
> > - the angularjs code asks RT for some ticket head data (via REST),
> > - gets JSON answer from RT,
> > - and shows to the user on the html.
> >
> > small step, but we are happy :)
>
> Is your source control public yet?
>  - Alex
>
>
> --
> RT Training - Dallas May 20-21
> http://bestpractical.com/training
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-devel/attachments/20140404/0a48579c/attachment-0001.html>


More information about the rt-devel mailing list