I am new with angular, so i hope this question is not to stupid.
as the title says, i wish to populate a list using angular and a method from a mvc controller. But i cannot figure out how to call the method? i have tried making a http request but i cannot get i to work.
Am i totally lost or is it somthing like this below?
Here are the list.
<div ng-app="cardList" ng-controller="CardController"></div>
<p><input type="text" ng-model="test" /></p>
<ul>
<li ng-repeat="x in names | filter:test">
{{x}}
</li>
</ul>
and here is the script.
<script>
var list = $http({ url: "Controllers/CardController/AllCardsList", method: "GET" });
angular.module('cardList', []).controller('CardController', function ($scope) {
$scope.names = [list];
});