是先定义了dict
'use strict';
angular.module('app').value('dict',{}).run(['dict','$http',function (dict,$http) {
$http.get('data/city.json').then(success)
{
dict.city = success.data;
}
$http.get('data/salary.json').then(success)
{
dict.salary = success.data;
}
$http.get('data/scale.json').then(success)
{
dict.scale = success.data;
}
}])
然后再在searchCtrl中声明的