few years back I’ve created a post for cascaded dropdown using jquery ,php and mysql , when I was working on my first angular project I’ve got the same dependent dropdown situation.
in many projects we need dependent dropdown , like country , states and then cities . its working is same as in this demo .
but here instead of jquery we are using angular and for database you can create a webserivces in php or you can fetch data from json files stored locally.
you can get sql dump and json from github repo , after you download it , you have to setup a webservice for that , you can download the webservice project from here .
instructions to setup the webservice can be found here
how to install cascaded dropdown angular
we are using the same webservice that we use in cascaded dropdown using php . you can replace or remove index.php .
now clone or download the project cascaded dropdown angular , once you download it you need to got to the project and run
npm install
after succefully installation , you need to configure the envirnment variable, to do that goto src/environments directory and change apiBaseUrl with your webservice url.
thats all now run
ng serve
or
npm serve
thanks