HTML uses Angular JS to load bank information and traverse it into Radio and angularradio

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.