Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
angularjs directive to show the quickbooks connect button
'use strict';
.directive('connectToQuickbooks', function($window){
return {
restrict: 'E',
template: "<ipp:connectToIntuit></ipp:connectToIntuit>",
link: function(scope) {
var intuitScriptLoaded = function(){
return $
&& $
&& $
&& $;
if (intuitScriptLoaded()) {
// Hack to get the button to reload when this directive is shown
// for the second time, since the QB connect button assumes that
// the button is not rendered dynamically
} else {
var script = $window.document.createElement("script");
script.type = "text/javascript";
script.src = "//";
function(newValue, oldValue) {
if(intuitScriptLoaded()) {
grantUrl: '/'

It is not work for me. After new window opened, window immidiately redirected to grant URL. What i'm doing wrong?

popup opens but its not aunthicate, Its not connect with he App

can someone help me on this.
Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment