Forum Discussion

cike's avatar
cike
Champion
7 years ago

Requirements for using Lithium's built-in Angular

Hi there,

I'm trying to add some custom AngularJS stuff to our community. I already read this article on how to bootstrap/integrate my custom AngularJS to Lithium Angular component.

Well, if I use the approaches from the article, I still get an error on my console where my angular.module(...)... crashes, because angular is undefined.

If add an external AngularJS via a common script tag everything works as expected.

 

Are there some requirements the need to be achieved before using Lithium's built-in AngularJS?

 

Thanks and best regards,

Christian

  • cike You can try this way

    <@liaAddScript angular="true">
    ;(function(angular) {
    	'use strict';
    	//to do
    })(window.LITHIUM && LITHIUM.angular || angular);
    </@liaAddScript>
    • cike's avatar
      cike
      Champion

      VarunGrazitti - Yes, I also tried the different approaches to bootstrap my custom angular. But nothing worked for me.

      The "angular" object is still undefined like the "LITHIUM.angular" object, too. I tried to inspect this on my javascript console, but there is only an empty object named "LITHIUM.Angular".