angular.js - I want to use angular to simulate the select drop-down box effect, as shown below, but I don't know how to achieve it?
高洛峰
高洛峰 2017-05-15 17:00:11
0
2
504

When the user clicks on the p (A) of "Wuhan", a drop-down box p (B) will appear. The content in B is dynamically generated. Then click on any content in B, and then assign it to A. area, and then B is hidden.

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
巴扎黑

Look for open source reference
https://github.com/angular-ui/ui-select

左手右手慢动作

controller:

$scope.names = [{
    name: 'tom'
},{
    name: 'jack'
},{
    name: 'xiaoming'
}];

html

<p>
    <select ng-options="names.name for names in names">
        <option value="">请选择</option>  <!-- 直接用模型值第一个会为空,所以这里填充第一个 -->
    </select>
</p>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template