Showing posts with label news ticker. Show all posts
Showing posts with label news ticker. Show all posts

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.


News ticker with AngularJS/RestAPI in SharePoint

Hi all,

In this post, i want to show you how to add news ticker in SharePoint with AngularJS/RESTApi.

Here the steps:

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

2. Add few items to the list.

















3. Now upload required javascript/css files named as
    a. modern-ticker.css
    b. theme.css
    c. jquery-1.11.0.min.js
    d. angular.min.js

4. Here am adding new page to show the news ticker and you may can add this snippet in your master page.

Here the complete code snippet for new ticker,





Here the final Output:





Here the complete source code.