My application is assigned to the variable $ scope variable in the controller, for example, $scope.myVariable = 123;this code After starting the Closure Compiler turns into $scope.a = 123;and $scope.b = 123;and so on ...
My html templates have things like <p>{{ myVariable }}</p>I need to update the templates to <p>{{ a }}</p>to match the new name of the renamed property myVariable.
I know that I can use the CC annotation /** @expose */, or I can do something like $scope['myVariable'] = 123so that CC does not rename this particular property. However, I would like to keep the renaming of the properties of variables.
I have 2 options that I see:
Write a script that uses _props_map.out from CC and write a script that performs a search replaces strings in my HTML.
Write my templates in javascript so that CC also processes my templates and then runs a template function that spits out the html of the template.
What would be the best way to keep my variables renamed and update my html template?
source
share