Skip to content

Instantly share code, notes, and snippets.

Last active December 25, 2017 16:49
  • Star 9 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Quick Feed Reader with AngularJS
<!DOCTYPE html>
<html ng-app="RSSFeedApp">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>AngularJS Feed Reader - jsFiddle demo</title>
<script type='text/javascript' src="//"></script>
<script type='text/javascript' src='//'></script>
<script src="//"></script>
<link rel="stylesheet" type="text/css" href="//">
<link rel="stylesheet" type="text/css" href="//">
<style type='text/css'>
@import url(,700);
<script type='text/javascript'>
'use strict';
var App = angular.module('RSSFeedApp', []);
App.controller("FeedCtrl", ['$scope','FeedService', function ($scope,Feed) {
return {
parseFeed : function(url){
return $http.jsonp('//' + encodeURIComponent(url));
<div class="container-fluid">
<div data-ng-controller="FeedCtrl">
<div class="row-fluid">
<h4>Feed Reader using AngularJS</h4>
<div class="input-prepend span12">
<div class="btn-group">
<button class="btn btn-info" type="button" tabindex="-1">{{loadButonText}}</button>
<button class="btn btn-info dropdown-toggle" data-toggle="dropdown" tabindex="-1">
<span class="caret"></span>
<ul class="dropdown-menu">
<li><a href="#" ng-click="feedSrc='';loadFeed($event);">CNN</a></li>
<li><a href="#" ng-click="feedSrc='';loadFeed($event)">Hacker News</a></li>
<li><a href="#" ng-click="feedSrc='';loadFeed($event)">Mashable</a></li>
<li><a href="#" ng-click="feedSrc='';loadFeed($event)">Huffington Post</a></li>
<li><a href="#" ng-click="feedSrc='';loadFeed($event)">TechCrunch</a></li>
<input type="text" class="span10" autocomplete="off" placeholder="Enter Feed URL" data-ng-model="feedSrc" />
<div class="input-prepend">
<span class="add-on"><i class=" icon-search"></i></span>count
<input class="span12" type="text" data-ng-model="filterText" />
<div class="row-fluid">
<ul class="unstyled">
<span class="badge badge-warning" ng-show="feeds.length > 0">{{(feeds | filter:filterText).length}} Items</span>
<li ng-repeat="feed in feeds | filter:filterText">
<h5><a target="_blank" href="{{}}">{{feed.title}}</a></h5>
<p class="text-left">{{feed.contentSnippet}}</p>
<span class="small">{{feed.publishedDate}}</span>
Copy link

Aravin commented Dec 25, 2017

will it work now?

Copy link

That was like a million years ago. May not work. But can be made to work of course. This is part of a blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment