An AngularJS (1.x) RESTful service wrapper for the Sanji IoT framework. Version 1.5.0 is the latest stable release, last updated around 2017 and currently in maintenance mode. It provides a simple HTTP/WebSocket abstraction for REST API calls, supporting common methods like get, post, put, delete, etc. Key differentiators include protocol switching (default HTTP, can switch to WebSocket) and integration with ng-file-upload. Dependencies: Angular >=1.4 <1.7 and ng-file-upload ^12.2.13.
npm install sanji-rest-uiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install, include the sanji.rest module, and use the rest service for GET and POST requests with error handling.
Use AngularJS 1.x or migrate to a different HTTP service for Angular 2+.
Use 'sanji.rest' when defining angular module dependencies.
Always use .then/.catch for promise handling.
Ensure your backend conforms to Sanji REST conventions or develop a custom adapter.
Ensure you have 'import' or 'require' the sanji-rest-ui package before defining your angular module: run 'npm install sanji-rest-ui' and include the script or bundle.
Add the script tag for sanji-rest-ui (e.g., <script src="node_modules/sanji-rest-ui/dist/sanji-rest-ui.js"></script>) or configure your module bundler to include it.
Add '$inject' annotation as shown: AppController.$inject = ['rest']; and ensure the module 'sanji.rest' is included in the app.