Name: ngOrwell
Owner: Lucidworks
Description: A simple angular observer for AngularJs 1
Created: 2016-01-19 17:52:40.0
Updated: 2017-04-13 11:15:43.0
Pushed: 2016-04-11 20:56:09.0
Homepage: null
Size: 19
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A simple angular observer for AngularJs 1
You can install this package either with npm
or with bower
.
install ng-orwell
Then add ng-orwell
as a dependency for your app:
lar.module('myApp', [require('ng-orwell')]);
r install ng-orwell
Add a <script>
to your index.html
:
ipt src="/bower_components/ng-orwell/Orwell.js"></script>
Then add ngOrwell
as a dependency for your app:
lar.module('myApp', ['ngOrwell']);
Orwell is a simple to use observable for AngularJs 1.
p.controller('myController', function(Orwell){
ll.createObservable(name, content);
ll.getObservable(name);
This will call all your observer callbacks who are observing this observable.
myContent = {
mething: 'something'
observable = Orwell.getObservable(name);
rvable.setContent(myContent);
ll.deleteObservable(name);
observable = Orwell.getObservable(name);
observer = observable.addObserver(function(content){
your callback code here.
observable = Orwell.getObservable(name);
observer = observable.addObserver(function(content){
your callback code here.
pe.$on('destroy', function(){
servable.removeObserver(observer);