Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An AngularJS controller that makes requests to
var myApp = angular.module('myApp', []);
myApp.controller('SRChannelsController', ['$scope', '$http', function($scope, $http) {
$scope.header = 'Radio channels on Sveriges Radio';
$scope.filter = "Riks";
$scope.filterChanged = function() {
getChannelsInfo = function(filter) {
var promise = $http.get("" + filter);
promise.then(function(response) {
var channels =;
$scope.channels = channels;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment