Orientation

28 Jun 20171 minute to read

Rating provides support for vertical orientation. By default Rating renders with horizontal orientation. You can the change the orientation by the orientation property.

The following code example is used to render the Rating control with vertical orientation.

Add the following HTML to render Rating with customized orientation.

  • HTML
  • <div id="container" style="border: 1px solid black; width: 300px; padding: 2px">
        <table>
            <tr>
                <td valign="top">Rating:
                   </td>
                   <td>
                     <input id="rating" type="text" ej-rating e-orientation="orientation"/>
                   </td>
               </tr>
          </table>
     </div>
  • JAVASCRIPT
  • // Add the following script to render Rating with customized orientation.
     angular.module('ratingApp', ['ejangular'])
       .controller('RatingCtrl', function ($scope) {
           $scope.orientation ="vertical";
     });

    The following screenshot illustrates the Rating with vertical orientation.