Calling angular directive from meteor isn't working -
i trying call angular directive meteor display intuit button. have tried using quickbook button directly in meteor, didn't work did not allow me display button in area of choice. hence route .
the directive defined in js file in following way
if (meteor.isclient) { console.log("yes client"); angular.module('connectintuitangular',['angular-meteor']) .directive('connecttoquickbooks', function($window){ return { restrict: 'e', template: '<ipp:connecttointuit></ipp:connecttointuit>', link: function(scope) { var script = $window.document.createelement("script"); script.type = "text/javascript"; script.src = "https://appcenter.intuit.com/content/ia/intuit.ipp.anywhere-1.3.3.js"; script.onload = function () { console.log("on load called"); scope.$emit('intuitjs:loaded'); }; $window.document.body.appendchild(script); scope.$on('intuitjs:loaded', function (evt) { $window.intuit.ipp.anywhere.setup({ granturl: '/' }); scope.connected = true; scope.$apply(); }); } } });
}
i try use directive in meteor template in following way , button doesn't show, rest of components in template shows.
<div ng-app="connectintuitangular"> <connect-to-quickbooks></connect-to-quickbooks> </div>
the same code works when try in plain angular, alsoi have meteor angular package(urigo:angular) included.
change
angular.module('connectintuitangular',['angular-meteor'])
to
angular.module('connectintuitangular')
it might work. every time angular.module
called don't need include other modules.
Comments
Post a Comment