AngularJS:如何将web.config中的数据带到视图控制器?

AngularJS:如何将web.config中的数据带到视图控制器?,angularjs,web-config,Angularjs,Web Config,如何将数据从web.config带到视图控制器(xxx.controller.js)?谢谢大家! 添加信息 web.config: <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <se

如何将数据从web.config带到视图控制器(xxx.controller.js)?谢谢大家!

添加信息

web.config:

<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="HHH.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <appSettings>

    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />

    <add key="querytime" value="6000"/>
    <add key="offsettime" value="86400"/>
    <add key="alarmarmingtime" value="300"/>
  
  </appSettings>

...

但它不识别“Convert”或“ConfigurationManager”

谢谢你的金利什!我能够实现您传递给我的解决方案


anthonychu.ca/post/如何将webconfig设置传递给angularjs

需要更多的上下文,也许还需要一些您尝试过的代码。但这有帮助吗?亲爱的Kinglish,我正在查看发生在我身上的信息,但我无法使其正常工作。谢谢Kinglish!我能够实现您传递给我的解决方案。欢迎使用堆栈溢出。请坐飞机。只有答案属于答案部分。请阅读
   vm.radiationPresent = function () { 

            $http.get('/api/radiation/GetAlarmRad').then(function (response) {
                if (response.data == true) {
                    console.log('radiationPresent parte V');
                    return alert('Evento de radiación!!');
                } else {
                    console.log('radiationPresent parte F');
                    return alert('No hay evento de radiación...');
                }

            })
        };

        //$interval(vm.radiationPresent, 6000); 
        $interval(vm.radiationPresent, Convert.ToInt32(ConfigurationManager.AppSettings["offsettime"]));