Skip to content
Loading
+1
  • Mukesh Nayak
    +1
    HI ,
     
    I have done following changes :
    1. <label>    
    2.       INTITULE PHASE PROJET    
    3.       <select #projetphase>    
    4.         <option *ngFor="let ph of projetList[0].phases" [value]="ph.libelle">{{ ph.libelle}}option>    
    5.       select>    
    6.     label>   
    i think first change you make sure the the name of select from your script it was #projetList  which was wrong . Further i have taken first element of your array and taken different phases. 
     
    Output 
     
     
     
    Regards,
    Mukesh Nayak
    +1
  • +1
    Mukesh Nayak
    thank you so much it works 
     
    if i do not bother can you correct me this code my goal is when i choose in select it shows me the list of projects that have in execution
     
     
    1. import {Pipe, PipeTransform } from '@angular/core';  
    2. @Pipe({  
    3.     name: 'PhasesPipe'  
    4. })  
    5. export class PhasesPipe implements PipeTransform {phases:any;  
    6.     transform(projetList: any, PhaseSearch: string)  
    7.     {  
    8.         if (projetList && projetList.length)  
    9.         {  
    10.               
    11.   
    12.             return projetList.filter(projetList =>  
    13.             {  
    14.                 if (PhaseSearch && this.phases.libelle.toLowerCase().indexOf(PhaseSearch.toLowerCase()) === -1)  
    15.                 {  
    16.                     return false;  
    17.                 }  
    18.                 
    19.                 return true;  
    20.            })  
    21.         }  
    22.         else  
    23.         {  
    24.             return projetList;  
    25.         }  
    26.     }  
    27. }  
     
    +1
  • Manav Pandya
    0
    Hello
     
    You can get complete help by following below articles :
     
    http://www.ngx-translate.com/
     
    https://medium.com/letsboot/translate-angular-4-apps-with-ngx-translate-83302fb6c10d
     
    https://scotch.io/tutorials/simple-language-translation-in-angular-2-part-1
     
    Thanks sir 
    0