Skip to content

rightstroke/angclass

Repository files navigation

MyApp

This project was generated with Angular CLI version 10.0.3.

Development server

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.

Code scaffolding

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.

Build

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.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

angclass

===============================================================

My Child Component

My Event Handling

Read Email

{{myEml.value}}

My Inter Polation / One way data binding(Controller to View)

{{title}}


Two Way Data Binding(Controller to View, & View to Controller)

My Company Name - [Data Binding] , (Event Binding)

{{myName}}


Looping in Angular

{{i}} = {{xyz.id}} - {{xyz.cName}} - {{xyz.countryName}}

Selected City is {{selectedCity.cName}}-{{selectedCity.countryName}}

  • {{c.id}} - {{c.cName}} - {{c.countryName}}
================================= public myName:string = "RSC Consulting"; public len:number=0;

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); } }); }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published