在学习angularjs的过程中,做了一个选择区域的小练习
实现后在不同浏览器居然无法实现功能
选择区域:
这是js
var phonecatApp = angular.module('phonecatApp', []);
phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', function($scope, $http) {
$http.get('json/map_provinces.json').success(function(data) {
$scope.phones = data;
$scope.query="120000";
$scope.num=0;
$scope.num1=0;
});
$scope.getcity=function(){
$http.get('json/map_city.json').success(function(data) {
$scope.num=1;
$scope.num1=0;
$scope.city = data;
$scope.mycity="no";
});
};
$scope.getareas=function(){
$http.get('json/map_areas.json').success(function(data) {
$scope.num1=1;
$scope.areas = data;
$scope.myareas="no";
});
};
//$scope.orderProp = 'age';
}]);
在360浏览器中
在firefox浏览器中
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
在select中用Ng-change
是不是IE版本问题?只有Angular1.2-才支持IE8.
上下文交待不清楚,比如ng的版本,360当前是极速模式还是兼容模式,控制台有无报错等等
1楼说的是对的,应该在
<select>中使用ng-change指令