Last active
December 28, 2015 15:59
-
-
Save arunkjn/7526068 to your computer and use it in GitHub Desktop.
BI Usage Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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