Skip to content

Instantly share code, notes, and snippets.

Last active August 11, 2016 19:25
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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