1234567891011121314151617181920212223242526272829303132333435 |
- 'use strict';
- angular.module('app').controller('AppCtrl',['$scope','$http','$state',function($scope,$http,$state){
- $scope.hosturl = main_host;
- //获取报名年份
- $scope.getBmYear = function(){
- $http.get($scope.hosturl+'/api/EvalStudentBmYears').success(function(data){
- if(data.success){
- $scope.bmyearlists = data.map.data;
- }
- });
- };
- //获取样本类型
- $scope.getSimpleType = function(){
- $http.get($scope.hosturl+'/api/EvalSimpleTypes').success(function(data){
- if(data.success){
- $scope.simpletype = data.map.data;
- }
- });
- }
- $scope.getBmProv = function(){
- $http.get($scope.hosturl+'/api/EvalQueryStudentAreas').success(function(data){
- if(data.success){
- console.log(data);
- $scope.bmprovlists = data.map.provinces;
- }
- });
- }
- }]).run(function($rootScope, $templateCache) {
- $rootScope.$on('$routeChangeStart', function(event, next, current) {
- if (typeof(current) !== 'undefined'){
- $templateCache.remove(current.templateUrl);
- }
- });
- });
|