Forum Discussion

phani's avatar
phani
Advisor
9 years ago

Lithium Angular Library is not calling custom angular app controllers

Hi,

 

We are using Lithium Angular Freemarker directive to register our custom angular app with Lithium angular app. But our controller is not calling. Following is code sample.

<div id="testContrlApp" ng-controller="testContrl">
                           Angular Test
                           </div>
                           <@liaAddScript angular="true">
                           ;(function (angular) {
                  
                           /* Registering the app with Lithium Angualr App */
                var coreModuleDeps = LITHIUM.AngularSupport.getOptions().coreModuleDeps || [];
                coreModuleDeps.push('testContrlApp');
                LITHIUM.AngularSupport.setOptions({ coreModuleDeps: coreModuleDeps });
                angular.module('testContrlApp',[])
                .config(['$httpProvider', function ($httpProvider) {
                    
/* Executing */
                    console.log("Going into Connfig");
                  
                }])
                .controller('testContrl',function($scope){ /* Controller */
                    
/* Not Executing */
                    alert("This is angualr code from controller")
                   
                });
          
             })(LITHIUM.angular);
            </@liaAddScript>

Could you please guide us to resolve this issue.

 

Thanks & Regards,

Phani

  • In 16.6, Lithium made security improvements to Lithium Angular code that will impact custom apps that have used our framework to build Angular apps and that get bootstrapped with Lithium Angular application. The change was to prevent cross-site-scripting injections from UGC by limiting which elements Lithium compile with Angular. Lithium now only compile elements that contain the li-bindable attribute. The developers will need to apply the li-bindable attribute directive to their directives and templates that need to be compiled.

1 Reply

  • In 16.6, Lithium made security improvements to Lithium Angular code that will impact custom apps that have used our framework to build Angular apps and that get bootstrapped with Lithium Angular application. The change was to prevent cross-site-scripting injections from UGC by limiting which elements Lithium compile with Angular. Lithium now only compile elements that contain the li-bindable attribute. The developers will need to apply the li-bindable attribute directive to their directives and templates that need to be compiled.