Getting Started

17 Dec 20183 minutes to read

This section helps to get started of the Rotator component for AngularJS.

Getting Started

Adding dependencies

The following steps guide you to add a Rotator component.

  1. Create an HTML file and add required scripts and CSS files for rendering Essential JavaScript component as given in the Getting Started.

  2. In addition to it for AngularJS implementation, refer the “angular.min.js” and “ej.widgets.angular.min.js” files.

  • HTML
  • <html ng-app="rotatApp">
            <title>Simple Rotator</title>
            <!-- Add Scripts and CSS for rendering Essential JS components --> 
                <script src=""></script>
                <script src="["></script>
            <body ng-controller="RotatCtrl">
                    <!-- Add Rotator component Here -->
                <ul id="sliderContent" ej-rotator />

    Component initialization

    1. Initialize the ng-app and ng-controller for the application. For adding Rotator component, you have to use ej-rotator directive to corresponding element.

    2. Now initialize the component using angular module in script section

  • angular.module('rotateApp', ['ejangular']).controller('RotateCtrl', function ($scope) {});

    Configure data

    To configure images for Rotator component, define data and apply to scope variable as given below.

  • var list = [
        {text:"Sea view", url:""},
        { text: "Snowfall", url: "" },
        { text: "Tablet", url: "" },
        { text: "Nature", url: "" },
        { text: "Card", url: "" },
        { text: "Bird", url: "" },
        { text: "Wheat", url: "" },
        { text: "Night", url: "" }];
        angular.module('rotateApp', ['ejangular']).controller('RotateCtrl', function ($scope) {

    Configuring properties

    Declare the rotator properties with prefix “e- “, refer the following code,

  • HTML
  • <div class="frame" style="width:600px; height:300px">
        <ul id="sliderContent" ej-rotator e-slideHeight="100%" e-dataSource="data" e-showPlayButton="true" e-isResponsive="true" e-slideWidth="500px"
        e-showCaption="true" e-animationType="animation" e-pagerPosition="TopLeft" e-frameSpace="2px" />

    Adding dependencies


    All the Syncfusion component’s properties for Angular is defined using [e-prefix] followed by the property name. You can find the complete API list from the API reference