Skip to content

Instantly share code, notes, and snippets.



Last active Aug 11, 2016
What would you like to do?
The Wikitude Config function to be incuded in the run method of the main module
* Created by yailanderson on 06/06/16.
'use strict';
(function (angular) {
* @param WikiTude
* @param Config
* @param $window
* @param $ionicPlatform
function wikiTudeConfig (Config, $window, $ionicPlatform) {
// the wikitude sdk key included from your config file
var wikitudKey = Config.ENV.WIKITUDE_SDK_KEY;
$ionicPlatform.ready(function () {
if ($window.cordova) {
var wikitudePlugin = $window.cordova.require('com.wikitude.phonegap.WikitudePlugin.WikitudePlugin');
//set the wikitude key
wikitudePlugin._sdkKey = wikitudKey;
$window.plugins.wikitudePlugin = wikitudePlugin;
//console.log('wikitude plugin: ', $window.plugins.wikitudePlugin);
wikiTudeConfig.$inject = ['Config', '$window', '$ionicPlatform'];
// Main module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.