This project was generated with Angular CLI version 10.0.3.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
===============================================================
public myEmail:string="";
myCities:City[]= [];
selectedCity:City;
//Dependency Injection of Service constructor(private cService:CalcService) { setTimeout(() => { console.log("I am here..."); this.title = "Manic Basha..."; }, 7000);
this.myCities = [
{id:1,cName:"Chennai",countryName:"India"},
{id:2,cName:"மதுரை",countryName:"இந்தியா"},
{id:3,cName:"Bangalore",countryName:"India"}
];
console.log(this.cService.sum(999,1000));
}
public handleCityList(c:City){ this.selectedCity = c; //console.log(this.selectedCity); }
public handleEmailEntry(e){
this.myEmail = e.target.value;
//console.log(Email is....${e.target.value});
}
public handleSubmit(data:string){
this.myEmail = data;
//console.log(CLick Email is....${this.myEmail});
}
public handleAddCity(c:City){ //console.log(JSON.stringify(c)); console.log(c); this.myCities.push(c);
}
public handleRemoveCity(ids:number){ //console.log("the removed id is ..." + ids); //splice this.myCities.forEach((item,index)=>{ //console.log(JSON.stringify(item)+ ",idx==" + index); if (item.id ==ids){ this.myCities.splice(index,1); } }); }