Skip to content

Instantly share code, notes, and snippets.

@arunkjn
Last active December 28, 2015 15:59
Show Gist options
  • Save arunkjn/7526068 to your computer and use it in GitHub Desktop.
Save arunkjn/7526068 to your computer and use it in GitHub Desktop.
BI Usage Example
// Declare AiqBiViz as a dependency of your application module
var app = angular.module('myApplication', ['AiqBiViz']);
//Configure the bi module in your config block
app.config(function($biConfigProvider){
//pass all configuration parameters as a single JSON
$biConfigProvider.init({
url: "http://theUrlToBiServiceApi.com"
});
// or alternatively, just set a single property
$biConfigProvider.setUrl("http://theUrlToBiServiceApi.com");
});
// You can retreive any configuration value in your application as follows
app.controller('AppController', function($biConfig){
// prints "http://theUrlToBiServiceApi.com"
console.log($biConfig.getUrl());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment