Javascript 编号:4} {x.Lo |编号:4} {x.关闭|编号:4} 谢谢。这很有帮助。我来看看你发布的学习角度链接。也许现在我知道了足够的知识去上学了。:-)很高兴能提供帮助,当我开始使用angular时,我花了大约一个月的时间才放下jquery!永不回头! &

Javascript 编号:4} {x.Lo |编号:4} {x.关闭|编号:4} 谢谢。这很有帮助。我来看看你发布的学习角度链接。也许现在我知道了足够的知识去上学了。:-)很高兴能提供帮助,当我开始使用angular时,我花了大约一个月的时间才放下jquery!永不回头! &,javascript,asp.net,angularjs,Javascript,Asp.net,Angularjs,编号:4} {x.Lo |编号:4} {x.关闭|编号:4} 谢谢。这很有帮助。我来看看你发布的学习角度链接。也许现在我知道了足够的知识去上学了。:-)很高兴能提供帮助,当我开始使用angular时,我花了大约一个月的时间才放下jquery!永不回头! <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Nam

编号:4} {x.Lo |编号:4} {x.关闭|编号:4}
谢谢。这很有帮助。我来看看你发布的学习角度链接。也许现在我知道了足够的知识去上学了。:-)很高兴能提供帮助,当我开始使用angular时,我花了大约一个月的时间才放下jquery!永不回头!
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js">  </script>
<script>
var angularApp = angular.module('myApp', []);

angularApp.controller('SecuritiesCtrl', function ($scope, $http)
{
    $scope.Securities = {};
    $scope.Quotes = {};
    $scope.message = '';
    $scope.GetQuotes = function(){
        $scope.message = 'Loading...';
        var count = 10;
        var sURL = "http://stevegaines.info/api/Data/GetQuotes?id=" + SecuritiesModel.SecurityID + "&count=" + count + "&extra=1";
        $http.get(sURL).
            success(function (data)
            {
                $scope.Quotes = data;
                $scope.message = '';
            });
    }
    var sURL = "http://stevegaines.info/api/Data/GetSecurities?id=0&securityType=CASH";
    $http.get(sURL).
        success(function (data)
        {
            $scope.Securities = data;
        });
});
</script>
<div ng-app="myApp">
    <div ng-controller="SecuritiesCtrl">
        <select ID="SecurityID" ng-model="SecuritiesModel" ng-options="x.SecurityID as x.TrueSymbol for x in Securities | filter:'USD'">
        </select>
        <button ng-click="GetQuotes()">Get Quotes</button>
        <br />
        <div>{{message}}</div>
        <hr />
    </div>

     <div>
     <table id="QuotesTable">
          <tr>
            <th>Time</th>
            <th>Open</th>
            <th>Hi</th>
            <th>Lo</th>
            <th>Close</th>
          </tr>
          <tr ng-repeat="x in Quotes">
            <td>{{ x.QuoteTime }}</td>
            <td>{{ x.Open }}</td>
            <td>{{ x.Hi }}</td>
            <td>{{ x.Lo }}</td>
            <td>{{ x.Close }}</td>
          </tr>
        </table>
    </div>
</div>