Write scalable JavaScript with static types. Learn TS syntax, generics, unions, narrowing, decorators, modules, build tooling, and tsconfig. Improve DX, refactoring safety, and API design across Node.js and frontend frameworks with practical examples.
626 posts185 contributors
Hi i don't know the key name , it can be anything and it can be any number each time so how to assign values to dynamic keys of object for example obj["anything"] = anything;
I am trying to unit test my angular app.as am new to this karama test i am trying to karma,jasmine and protractor..i ve downloaded and all karma dependencies.i am using angular webpack version in visual studio 2017.i am facing some issues like 1.karma html loader is not loading,only i can see karma v1.7.0 is connected,while debugging am getting module error in karma browser but application works fine 2.i have done a component testing but its showing error..in CLI version its working 3.i ve downloaded protractor do i need to add protractor.js manually? 4.How to configure karma in webpack version to get html view What I have tried: my pakage.json { "name" : "EfficiencyClassWebApp" , "private" : true , "version" : "0.0.0" , "scripts" : { "test" : "karma start ClientApp/test/karma.conf.js" }, "depe
i have a dropdown like <select [(ngModel)]="car.Marketid" required name="Marketid" id="Marketid" ngModel class="form-control"> <option [ngValue]="select" disabled [selected]="true">--Select Market--</option> <option *ngFor="let code of names" value="{{code.marketId}}">{{code.marketName}} - {{code.SpecMarketCode}}</option> </select> in my "save" methode in ts i need to get Markrtid which i selected from this dropdown and MarketName but here [(ngModel)]="car.Marketid" so im getting only id in my save methode in ts file. i need to get marketname also how can i get?
hi, i want to create register and login with google or facebook or simple forms using angular2+ and in backend i have database . how to do please? and thanks in advance
hi, i have this exercise, can anyone exmplain to me I understood only one thing is the connection via facebook or google and the connection via form this is description of exercise " An online game accessible via a website called Play Free bet. The objective of the game is to earn points by betting on matches. Users can authenticate automatically via networks Google and Facebook, or manually via a form authentication New users are assigned X number of points. The system offers users access to all sports covered by the site, subscribe to one or more sports and bet on future matches. Match catalogs will be retrieved via remote webservices. Each user with points can bet on a match. A points system must be developed for each match (according to the competitions, match levels, ....) " and thanks in advance
hi, i have problem in each click on the button it returns to me the result I want after the click and show me result after the inputs will be emptied it shows me nothing here is a descriptive picture of the problem app.component.ts import { Component,OnInit } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent { firstdate:Date; lastdate:Date; filterdata:any; dateCheck(fDate:Date,lDate:Date) { if(this.projetList && this.projetList.length) {  
hi, I want to filter some details by start date and end date how to do please and thanks in advance
hi, I am beginner in angular2+ and I want to create a component that contains a search box (which allows to search for a book) and next to it a button that allows to display the search criteria or hide them the research criteria are: * either by name of the book when you check it allows you to display a dropdown list of all the books when you click on a book it shows you the requested book. * either by start date and end date PS: I use Angular2 + thank you in advance
hi, i have array that contains another array like this when i want display for example phases.libellei can't i use this array this.projetList = [{ title: "Titre du projet 01", dateDebut: "21 mars 2017", dateFin: " 01 Janvier 2018", img: "./assets/img/projet_1.jpg", filliale: "F1", doc_fiche_projet: "../pdf/test_pdf.pdf", responsable: "Resposable projet", taille_fiche_projet: "pdf 4.06 Mo", objectif: "Lorem ipsum dolor sit amet", type_projet: "Organisation", domaine: "Domaine fonctionnel 01", &nbs
hi, how to show and hide a search box by criterion in angular 2+ and thanks in advance
hi, I want to translate my website in angular2 it contains 7 components: * first the header that contains choose your language * second navbar component * third footer component * fourth login component * fifth register component * sixth home component * seventh sidebar component i want use ngx-translate and thanks in advance
hi, i have a problem when i click in button i want to show just element related with button but in my script when i click in the button i show the other elements how can i solve this please ? and thanks in advance < div * ngFor = "let pa of p.phases" > < div class = "col-md-2" > < button class = "btn btn-default" (click)=" showlivrable =!showlivrable" style = "width: 133px;height:133px;" > < img * ngIf = 'pa.libelle == "demarrage"' src = <span c
hi, i want to display phases.code when phases.libelle = "planning" how to do please? and thanks in advance PS:angular2 this.projetList = [{ title: "Titre du projet 01", dateDebut: "21 mars 2017", dateFin: " 01 Janvier 2018", img: "./assets/img/projet_1.jpg", filliale: "F1", doc_fiche_projet: "../pdf/test_pdf.pdf", responsable: "Resposable projet", taille_fiche_projet: "pdf 4.06 Mo", &
Hi, can anyone help me to fix this error this is my script and thanks in advance main.component.html <!-- MAIN CONTENT --> < div id = "main-content" > < div class = "jumbotron" > <!--span class = "sp" > Notre philosophie.Notre travail consiste à aider chaque entreprise à comprendre son marché, marquer son territoire face à la concurrence, séduire le public par l'attraction de la marque ou motiver le stagiaire sur le projet d'entreprise. </ span > &nb
hi, I want to create a simple a contact form whose user completes the form and receives a message in the email I want to try with a test from local how to do it please? PS:i use angular2 and thanks in advance
hi, I have an application that contains 4 components * The first component is the header * The second is navigation * The third footer * The fourth is the main (home) which contains a login / register page and a text if the user logged in now I can not understand where the problem is, can you help me please? Please find attached my application and errors displayed And thank you in advance
hi, how to Make the site multilingual (English French); automatically allow to change the language of a simple button. and thanks in advance
I am trying crud operation in client side without using any database using inline editing in Angular 4.i am able to bind the values but while updating, values updated but saving as a new value, rest of the table values are not showing. Add new function also not working in my code 1.update is not working 2.addin a new row is not working my html < table class = "table table-striped table-bordered" cellspacing = "0" > < thead class = "table-inverse" > < tr > < th > EWID </ th > < th > MMID </ th > &nbs
Hello, I have a form that contains an email, password and password confirmation I have to check if user has entered a valid email and password must be minimum of 8 characters (upper case, miniscule, number) and password confirmation = password how to do it please without using the classes I want a simple method And thank you in advance < div class = "container" > < div class = "panel-body" > < div class = "row" > < label for = "email" > Email </ label >  
Hello, What is the difference between creating services and creating classes in angular 2 And thank you in advance
Hi, I want create function in component Who add in array values form using foreach Thanks in advance
Hello, I create a mini login and register project I will leave my script down my problem is when the user creates an account and he redirects to login he can not log in I do not know why ?? if the user connects by the values entered in the service it is good but the opposite if he registers after he connects PS: I use angular2 how to please and thank you in advance app.component.ts import { Component } from '@angular/core'; @Component({ selector: 'my-app', template: ` <!-- Fixed navbar --> < nav class = "navbar navbar-default" > < div class = "container" > </
I have a home page and login I want if the user is not logged I redirect him to the login page to authenticat here is my script login.component.ts import { Component } from '@angular/core'; import {Routes, RouterModule} from '@angular/router'; import { Router } from '@angular/router'; import {AuthenticationService,User} from './data.service' @Component({ selector: 'my-login', providers: [AuthenticationService], template: ` < div class = "container" > < div class = "title" >
hi, I create a mini project that contains a homepage which I have to check whether the user connect or not if it is connected it stays in the home if the opposite I redirect to login how to please and thank you in advance
Hello, I have a user class export class User { constructor ( public email : string , public password : string ) { this . email = email ; this . password = password } } I'm storing the values of this class in an array like this users : User []= [ new User ( '[email protected]' , 'adm9' ), new User ( '[email protected]' , 'a23' ) ]; after I create an add_user function that allows to add a user add_user ( user : User ) { this .<