Uploaded image for project: 'Nuxeo JS Client'
  1. Nuxeo JS Client
  2. NXJS-25

Create nuxeo-angular module

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: AngularJS
    • Tags:
    • Sprint:
      TGV 7.2-5
    • Story Points:
      5

      Description

      Create a nuxeo-angular Angular module to be able to easily use nuxeo-js-client inside an Angular application.

      For now, nuxeo-angular will not use $http from Angular, but still relies on jQuery to do the HTTP calls.

      All methods accepting a callback will be wrapped to expose Promises (through $q) to easily integrate it into an Angular application.

      For instance, the following code:

      client.connect(function(error, client) {
        if (error) {
          // cannot connect
          console.log('Client is not connected: ' + error);
        }
      
        // OK, the returned client is connected
        console.log('Client is connected: ' + client.connected);
      });
      

      will become:

      client.connect.then(function(client) {
        // OK, the returned client is connected
        console.log('Client is connected: ' + client.connected);
      }, function(err) {
        // cannot connect
        console.log('Client is not connected: ' + err);
      });
      

        Attachments

          Activity

            People

            • Assignee:
              troger Thomas Roger
              Reporter:
              troger Thomas Roger
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: