onClick Agregar clase activa en angular

// if needed add a boolean to the array and use it
for(let i = 0; i < this.subModules.length; i++){
	this.subModules[i].active = false;
}

<ul class="sub_modules">
  <li (click)="activateClass(subModule)"
      *ngFor="let subModule of subModules"
      [ngClass]="{'active': subModule.active}">
    <a>{{ subModule.name }}</a>
  </li>
</ul>
On The component

activateClass(subModule){
  subModule.active = !subModule.active;    
}
Karthick Ravindranath