国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - AngularJs cascade
黃舟
黃舟 2017-05-15 16:54:06
0
1
834

The version of Angular.js is 1.2.5
The function to be implemented is Select three-level linkage.
The problem that arises is: after selecting the second level (country), the third level (city) does not appear.
Please guide me heroes!

-- HTML code --

<p ng-app="app" ng-controller="global">
    <select ng-model="ihg" ng-options="ihg.text for ihg in g">
        <option value="">-- 洲際 --</option>
    </select>
    <select ng-if="ihg.nat" ng-model="nat" ng-options="nat.text for nat in ihg.nat">
        <option value="">-- 國(guó)家 --</option>
    </select>
    <select ng-if="nat.cities" ng-model="city" ng-options="city.text for city in nat.cities">
        <option value="">-- 城市 --</option>
    </select>
</p>

-- JS code --

var app=angular.module("app",[]);
app.controller("global",['$scope',function($scope){
    $scope.g=[
        {text:"亞洲",nat:[
            {text:"中國(guó)",cities:[{text:"北京"}]},
            {text:"巴林",cities:[]},
            {text:"韓國(guó)",cities:[{text:"首爾"}]},
            {text:"黎巴嫩",cities:[]},
            {text:"東帝汶",cities:[]},
            {text:"尼泊爾",cities:[]},
            {text:"泰國(guó)",cities:[{text:"曼谷"}]},
            {text:"巴基斯坦",cities:[{text:"伊斯蘭堡"}]}
        ]},
        {text:"歐洲",nat:[
            {text:"德國(guó)",cities:[]},
            {text:"英國(guó)",cities:[]}
        ]},
        {text:"北美洲"},
        {text:"南美洲"},
        {text:"非洲"},
        {text:"大洋洲"},
        {text:"南極洲"}
    ]
}]);
黃舟
黃舟

人生最曼妙的風(fēng)景,竟是內(nèi)心的淡定與從容!

reply all(1)
為情所困

ng-if changed to ng-show

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template