cgross / angular-owf

Angular service wrapper for the Ozone Widget Framework widget library
MIT License
0 stars 1 forks source link

angular-owf

Angular service wrapper for the OWF's widget javascript library.

Features

Getting Started

Install with Bower or download the the files directly from the repo.

bower install angular-owf --save

Add angular-owf.js to your index.html. This library also depends on the OWF Bower package and you'll need to add its owf-widget-min.js from it or from OWF directly.

Add cgOwf as a module dependency for your module.

angular.module('your_app', ['cgOwf']);

Then inject and use the owf service.

function myController($scope,owf){  // <-- Inject owf

    owf.Launcher.launch({
        universalName: 'widget.company.com'
    }).then(function(){
        console.log('Widget launched!');
    });

}

Running Outside of OWF

When running outside of an OWF contained widget, this service will instead contain various noop versions of the standard OWF methods. The noop-ed methods include OWF.ready(), OWF.getOpenedWidgets(), OWF.Launcher.launch(), OWF.Launcher.getLaunchData(), OWF.RPC.registerFunctions(), OWF.Eventing.publish(), OWF.Eventing.subscribe(), and OWF.Eventing.unsubscribe().

Release History