Angular - Use ngStrictDi with GoogleChart lib

I am loading googleChart library into angular app this way (in my app.js):

// load google-chart lib before angularJS to make it work
google.setOnLoadCallback(function() {
    angular.bootstrap(document.body, ['FlexyBeautyApp']);
});
google.load('visualization', '1', {packages: ['corechart']});

      

So, I have no ng-app directive in my index.html file on the body element. I want to use ngStrictDi which should be placed further in this ng-app directive.

Can I write ng-strict-di without ng app on the body, will this work fine?

+3


source to share


1 answer


The solution is similar: angular.bootstrap (document.body, ['FlexyBeautyApp'], {strictDi: true});



+2


source







All Articles