HTML uses Angular JS to load bank information and traverse it into Radio and angularradio
1. Engineering Structure
2. bankInfo. json
[
{"Code": "BOC", "name": "Bank of China" },{ "code": "ICBC", "name": "Industrial and Commercial Bank of China "}, {"code": "CCB", "name": "China Construction Bank" },{ "code": "ABC", "name": "Agricultural Bank of China "}, {"code": "CMBC", "name": "China Minsheng Bank" },{ "code": "CMB", "name": "China Merchants Bank "}, {"code": "CIB", "name": "" },{ "code": "BCM", "name": "Bank of Communications "}, {"code": "CEB", "name": "China Everbright Bank" },{ "code": "GDB", "name": "Guangdong Development Bank"}]
3. app. js
/** * Created by 1250052380@qq.com on 2015/1/23. */angular.module("bank",[])
.controller("bankController",function($scope,$http){
$http.get("../data/bankInfo.json")
.then(function(response){
$scope.banks=response.data; })
})
4.index.html
<!DOCTYPE html>5. Test Results
Attachment code: http://download.csdn.net/detail/musuny/8389723