0

I just recently moved over a legacy AngularJS application into an Angular9 shell in order to facilitate a smoother migration down the line.

Despite being able to render my Angular9 component through the AngularJS router, it appears as if the Angular9 component is inheriting ng-scope from the AngularJS content wrapper under the hood.

<div ui-view="content" class="ng-scope" style="">
   <div class="ng-scope">This should open a Modal for File 
        Upload</div>
   <button mat-raised-button="" (click)="openUploadDialog()" 
        class="ng-scope">Upload</button>
</div>

I tried looking for a fix to this solution but I have not been able to find similar issues.

Best, SC

Addendum:

I have this attempted fix which does not appear to be working, I am working in AngualrJS 1.6.

var core = angular.module('APP');  
core.config(['$compileProvider', function ($compileProvider) {
    $compileProvider.debugInfoEnabled(false);
}]);

Addendum:

The implementation of the solution was faulty, the following worked :

core.config(configure);

configure.$inject = ['$compileProvider'];

function configure( $compileProvider ) {

    $compileProvider.debugInfoEnabled(false)

};

Best

georgeawg
  • 48,608
  • 13
  • 72
  • 95
ManBearPig
  • 83
  • 1
  • 17
  • Does this apply at all? [Removing debug info in AngularJS](https://docs.angularjs.org/guide/production) – Phix Feb 26 '20 at 18:23
  • I have looked into this and applied the recommended $compileProvider fix without seeing a change in the client. – ManBearPig Feb 26 '20 at 19:03
  • Does this answer your question? [AngularJS: Disable or remove ng-scope and ng-binding from generated HTML](https://stackoverflow.com/questions/27513515/angularjs-disable-or-remove-ng-scope-and-ng-binding-from-generated-html) – Julien Feb 27 '20 at 07:10

0 Answers0