Registry / database / active-angular

active-angular

JSON →
library3.0.0-beta.0.0.8jsnpmunverified

AngularJS ORM providing model-based data management with relationships, validations, and hooks. Version 3.0.0-beta.0.0.8 is a pre-release with breaking changes from earlier betas. Release cadence is irregular. Key differentiators include lightweight integration with AngularJS's digest cycle and promise-based API. Not actively maintained; alternatives like restangular or plain $http are recommended.

npm install active-angular
INSTALL
IMPORT
SIG · ACTIVE-ANGULAR
A
active-angular
databasejavascriptv3.0.0-beta.0.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import active from 'active-angular'; angular.module('app', [active]);
const active = require('active-angular'); angular.module('app', [active]);
ESM-style default import works, but CommonJS works in bundlers
Model
import { Model } from 'active-angular'; class User extends Model { ... }
import active from 'active-angular'; active.Model.
Named export available but default import also gives access to Model
Schema
import { Schema } from 'active-angular'; var schema = new Schema(...);
var Schema = require('active-angular').Schema;
Named export works; CommonJS destructuring also valid

Demonstrates defining a model with schema, saving a record with AngularJS $http.

import angular from 'angular'; import active from 'active-angular'; import { Model } from 'active-angular'; class User extends Model { static schema = { username: { type: 'string', required: true }, email: { type: 'string', pattern: /@/ } }; fullName() { return this.firstName + ' ' + this.lastName; } } angular.module('app', [active]) .run(($http) => { User.api = $http; // bind HTTP service const user = new User({ username: 'johndoe', email: 'john@example.com' }); user.$save().then(() => console.log('Saved!')); });
Debug
Known issues
deprecatedLibrary is in maintenance mode and not recommended for new projects.
fix
Use restangular, ngResource, or plain $http instead.
affects: >=3.0.0
breakingVersion 3.0.0-beta series changed the API from 2.x; Model class and schema definition are different.
fix
Refer to the beta changelog for migration.
affects: >=3.0.0-beta
gotchaDoes not work with Angular 2+; only compatible with AngularJS 1.x.
fix
For Angular 2+, use other ORMs like @angular/common/http or angular2-orm.
affects: >=1.0.0
breakingRequires manual binding of $http or $resource to models; no automatic injection.
fix
Set Model.api = $http in your run block.
affects: >=3.0.0-beta
Errors
Common errors & fixes
Uncaught Error: Could not find module 'active-angular'
Module not installed or not loaded properly after npm install.
fix
Run npm install active-angular@3.0.0-beta.0.0.8 and ensure bundler/loader paths are correct.
TypeError: Model is not a constructor
Using wrong import style; Model is a named export, not default.
fix
import { Model } from 'active-angular';
Error: [active] No HTTP service provided
Forgetting to assign $http to Model.api.
fix
In your AngularJS module's run block: Model.api = $http;
Upgrade
Version history
3.0.0-beta.0.0.8latest on npm
Audit
Dependencies
angularrequiredRequires AngularJS as a peer dependency
lodashoptionalUsed internally for utility functions
Agent activity
49 hits · last 30 days
node
42
OpenAI (training)
1
Resources
active-angular — npm install active-angular · libregistry