import { Component } from
"@angular/core"
;
import {
trigger,
state,
style,
transition,
animate
} from
"@angular/animations"
;
import { SelectItem, PrimeNGConfig } from
"primeng/api"
;
import { CountryService } from
"./countryservice"
;
@Component({
selector:
"app-root"
,
templateUrl:
"./app.component.html"
,
styleUrls: [
"./app.component.scss"
],
providers: [CountryService]
})
export class AppComponent {
selectedCities: string[] = [];
selectedCountries1: string[] = [];
selectedCountries2: string[] = [];
items: SelectItem[];
item: string;
cities: any[];
countries: any[];
constructor(
private countryService: CountryService,
private primengConfig: PrimeNGConfig
) {
this
.items = [];
this
.countryService.getCountries().then(countries => {
this
.items = countries;
});
this
.cities = [
{ name:
"Nallasopara"
, code:
"Nallasopara"
},
{ name:
"Naigaon"
, code:
"Naigaon"
},
{ name:
"Mira road"
, code:
"MR"
},
{ name:
"Vasai"
, code:
"VASAI"
},
{ name:
"Virar"
, code:
"virar"
}
];
}
ngOnInit() {
this
.primengConfig.ripple =
true
;
}
}