HTML uses Angular JS to load bank information and traverse to Radio
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: Industrial Bank}, {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
<Script src = ../js/angular. min. js> </script> <script src = ../js/app. js> </script> {Bank. code }}- {bank. name} 5. Test Results