How to change the color of a button on Bootstrap and Angular

Currently the button is en red, when the user enters 2 figures for example, the button must be in blue. How i can create this switch on Bootstrap and Angular? <div class="col-12 col-md-4 text-center" [ngClass]="{‘success’: otp?.length == 2 ? true : false}"> <button class="customButton" (click)="signin()"> ok </button> </div> Thank you in advance Source: Angular Questions

By elodie
Published
Categorized as angular, bootstrap-4 Tagged ,

How can i change Language URL on the home page

I added the page home and about. In my home page when I click on NL the page is translated 1 sec in dutch but after the language reverts to English… It should be in NL except if the user clicks on another language. I don’t know where is the problem? Perhaps on app.component.html? <div […]

By elodie
Published
Categorized as angular, stackblitz Tagged ,

How can i change Language URL in Angular

On a dropdown list with 2 languages, I know how to do it the switch, there are several tutoriels. However, I am stuck when in my homepage I have to click on a url for example NL in the header. I don’t know how to do the switch language? app.component.ts import { Component } from […]

By elodie
Published
Categorized as angular Tagged

display "loading" on stackblitz

I am following a tutorial in Angular , the code works on Visual Studio but on Stackblitz.com, I have a message -> loading… I don’t understand why nothing isn’t display? I just did a copy/paste. It works correctly on Visual Studio, I don’t understand why it does not work on Stackblitz.com? The dependencies are: npm […]

By elodie
Published
Categorized as angular, stackblitz Tagged ,

How to change the color of the button in green if the user enters an exact value?

The user should enter 7 figures in the input, then the user enters 7 figures, the button should becomes green. I don’t know if it’s possible to make it in Angular? I don’t see how to transform the button in green ? Here is my code below <input type="text" class="inputSignInAccess" [(ngModel)]="otp" > <div class="error" style="color: […]

By elodie
Published
Categorized as angular Tagged

Validate an input only by 7 digits

The user can enter only 7 figures. If the user enters more than 7 figures, there is an error message -> "You need 7 digits" For example, if the user enters this -> 12345678910 I retrieve correcty the error message Here is the code … <input type="text" class="inputSignInAccess" [(ngModel)]="otp" > <div class="error" style="color: red; position: […]

By elodie
Published
Categorized as angular Tagged

Why my "<div * ngIf" erases my items from my <li>

I currently have a problem that I have never had. With this code below my texts appear correctly. <li data-help="4"> <span class="numberIconPage2" style="position: absolute; top: -238px">4</span> <p class="titrePage2" style="position: absolute; top: -238px;"> {{‘1609-1611’ | t }} </p> <p class="step1 help-1" > <input type="text" class="inputSignInAccess" [(ngModel)]="otp"> </p> </li> When I add this condition <div *ngIf="otp.length > […]

By elodie
Published
Categorized as angular Tagged

condition in Angular to check the number of characters in Angular

I would like that the user enters only 10 characters in the input. Below, the code works ! <input type="text" [(ngModel)]="otp" maxlength="10"> Except that, I would like to get an error message: For example -> Max 10 characters long. I think that, I have to create a condition in my HTML via Angular? I have […]

By elodie
Published
Categorized as angular Tagged

Language switch works after 2 clicks on a language

I have a problem with the language switch. I have 7 languages on my website. If I click on FR, the page is translated correctly. If I click on NL also, the page is translated correctly. However, If I click on EN, nothing is happening… I have to click 2 times to display the page […]

By elodie
Published
Categorized as angular, javascript Tagged ,

CSS in a project Angular

I have a folder named about with a file about.component.css I would like the background-color to be in aqua only for the page about.component.html. If I do in the file about.component.css this: body { background-color: aqua; } Nothing is displayed… This file in CSS is on this path: C:devdemosrcapphomehome.component.css I think that I have to […]

By elodie
Published
Categorized as angular Tagged

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq