New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-orwell

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-orwell

A simple observable for AngularJs 1

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

ngOrwell

A simple angular observer for AngularJs 1

Install

You can install this package either with npm or with bower.

npm

npm install ng-orwell

Then add ng-orwell as a dependency for your app:

angular.module('myApp', [require('ng-orwell')]);

bower

bower install ng-orwell

Add a <script> to your index.html:

<script src="/bower_components/ng-orwell/Orwell.js"></script>

Then add ngOrwell as a dependency for your app:

angular.module('myApp', ['ngOrwell']);

Documentation

Orwell is a simple to use observable for AngularJs 1.

Including orwell in angular

myApp.controller('myController', function(Orwell){

}

Creating a observable

Orwell.createObservable(name, content);

Getting an observable

Orwell.getObservable(name);

Updating content on an observable

This will call all your observer callbacks who are observing this observable.

var myContent = {
  something: 'something'
};
var observable = Orwell.getObservable(name);
observable.setContent(myContent);

Deleting an observable

Orwell.deleteObservable(name);

Adding an observer to an observable

var observable = Orwell.getObservable(name);
var observer = observable.addObserver(function(content){
  // your callback code here.
})

Destroying an observer

var observable = Orwell.getObservable(name);
var observer = observable.addObserver(function(content){
  // your callback code here.
})
$scope.$on('destroy', function(){
  observable.removeObserver(observer);
});

License

Apache 2.0

Keywords

FAQs

Package last updated on 22 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc