refactor(bazel): use getattr instead of hasattr in ng_module.bzl (#33765)
refactor(bazel): use getattr instead of hasattr in ng_module.bzl (#33765)

getattr improves code readability and makes the code also shorter.

PR Close #33765

gdi2290/angular,alxhub/angular,wKoza/angular,matsko/angular,IdeaBlade/angular,manekinekko/angular,matsko/angular,mgechev/angular,wKoza/angular,blesh/angular,IdeaBlade/angular,angular/angular,mgechev/angular,angular/angular,brandonroberts/angular,Toxicable/angular,gkalpak/angular,mprobst/angular,gnomeontherun/angular,gdi2290/angular,StephenFluin/angular,Toxicable/angular,gnomeontherun/angular,mprobst/angular,vikerman/angular,JiaLiPassion/angular,gdi2290/angular,brandonroberts/angular,filipesilva/angular,snaptech/angular,gkalpak/angular,shairez/angular,gkalpak/angular,manekinekko/angular,angular-indonesia/angular,matsko/angular,JiaLiPassion/angular,shairez/angular,angular-indonesia/angular,matsko/angular,brandonroberts/angular,manekinekko/angular,mgechev/angular,wKoza/angular,snaptech/angular,angular-indonesia/angular,brandonroberts/angular,gdi2290/angular,manekinekko/angular,brandonroberts/angular,snaptech/angular,vikerman/angular,IdeaBlade/angular,gnomeontherun/angular,Toxicable/angular,manekinekko/angular,JiaLiPassion/angular,mgechev/angular,snaptech/angular,gkalpak/angular,blesh/angular,angular/angular,gnomeontherun/angular,vikerman/angular,brandonroberts/angular,alxhub/angular,wKoza/angular,mprobst/angular,ocombe/angular,Toxicable/angular,ocombe/angular,blesh/angular,alxhub/angular,gdi2290/angular,shairez/angular,vikerman/angular,blesh/angular,filipesilva/angular,vikerman/angular,alxhub/angular,StephenFluin/angular,StephenFluin/angular,snaptech/angular,ocombe/angular,filipesilva/angular,gdi2290/angular,shairez/angular,alxhub/angular,IdeaBlade/angular,matsko/angular,filipesilva/angular,ocombe/angular,blesh/angular,vikerman/angular,snaptech/angular,IdeaBlade/angular,Toxicable/angular,mprobst/angular,mprobst/angular,StephenFluin/angular,wKoza/angular,mprobst/angular,manekinekko/angular,ocombe/angular,angular-indonesia/angular,angular/angular,Toxicable/angular,StephenFluin/angular,mgechev/angular,ocombe/angular,shairez/angular,wKoza/angular,JiaLiPassion/angular,filipesilva/angular