Friday, 5 February 2016

News ticker in SharePoint with AngularJS/RestAPI - Part 2

Hi all,

In my previous blog, have shown how to use news ticker in a page/master page.

Now i want to show one more type of active news ticker

Here the steps.

1. Create custom list named as "News" with two columns i.e. PageURL, HeadLines, IsActive.

2. Add few items to the list.




3. Now we want to show only active news headlines so we are changing RestAPI call as below,

var restUrl = _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/getbytitle('" + listTitle + "')/items?$filter=isActive eq 1";

As i told in the previous we can use the below snippet in a page or in master page.

Here the code snippet.



Here the final output..




Here the complete source code.


No comments:

Post a Comment