AngularJS directive for dependant select element
问题 I'm trying to write a directive for dependant select elements. The relationship is Country > States > Cities . When element with class country get changed I should update element with class states and the same behavior for element with class city . To get the states I only need the country id and for get cities I need country and state id's. So I did this code: app.directive('country', ['$http', function($http) { return { restrict: 'C', link: function(scope, element, attrs) { element.change