Robust isomorphic REST framework for browser (Angular, React, Vue) and backend (NodeJS/TypeScript) apps. Version 21.0.52. Built on axios as an alternative to Angular's HttpClient. Features: RxJS interop, JSONP support, class instance transfer between client/server, Express-style route definitions. Backed by the Taon ecosystem. Currently in active development with frequent releases.
npm install ng2-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: import Resource, define a class, create a Resource endpoint, and make GET requests using both Promise and Observable patterns.
Update imports to 'ng2-rest/browser' for browser, 'ng2-rest/node' for Node.js
Use { '': YourClass } syntax, not just YourClass directlyChain .get().observable to get RxJS Observable; omit .observable for Promise
No alternative, continue using this pattern
Use correct import: import { Resource } from 'ng2-rest/browser'Use named import: import { Resource } from 'ng2-rest/browser' (note curly braces)Use rest.model().array.get().observable for Observable; rest.model().get() returns Promise