Topic: Class "active" is not set when using an input

Alexander Zaytsev free asked 5 years ago

I have a fairly simple layout:

<app-root _nghost-c0="" ng-version="4.3.1"> <router-outlet _ngcontent-c0=""></router-outlet>
<div class="row" id="login"> 
<div class="col-md-6 offset-md-3"> 
            <div class="row"> 
              <div class="col-md-12"> 
                <form name="form" novalidate="" class="ng-dirty ng-valid ng-touched"> 
                 <div class="md-form"> 
                 <input class="form-control validate ng-dirty ng-valid ng-touched" id="f1" name="username" required="" type="text" ng-reflect-required="" ng-reflect-name="username" ng-reflect-model="asd"> 
                 <label for="f1" class="active">Username</label>

When user types something in the textbox, the active class is not applied to the <label> and so it overlays the entered text.
Any suggestions?

Edyta Dabrowska free answered 5 years ago

Please add mdbActive to the input field and check if it is working as you like.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No