Skip to content

Latest commit

 

History

History
125 lines (99 loc) · 4.16 KB

File metadata and controls

125 lines (99 loc) · 4.16 KB
layout post
title Separators in AngularJS Menu Control | Syncfusion
description Learn here all about Separators support in Syncfusion Essential AngularJS Menu control, its elements, and more.
platform AngularJS
control Menu
documentation ug
keywords ejmenu, menu, angularjs menu

Separators in AngularJS Menu

Menu can also contain separators that are horizontal bars between menu items. You cannot select a separator. Separators are somewhat similar to borders, except that they are genuine components and, as such, are drawn inside a control, rather than around the edges of the Menu control. enableSeparator is the property that is used to display the separators in the Menu control. It accepts the Boolean type value. Its default value is true.

Add the following the code sample to display the Menu control without separator by setting enableSeparator as false.

{% highlight html %}

  • Home
    • Foundation
    • Launch
    • About
      • Company
      • Location
  • Services
    • Consulting
    • Outsourcing
  • About
  • Contact us
    • Contact number
    • E-mail
  • Careers
    • Position
      • Developer
      • Manager
    • Apply online

{% endhighlight %}

The following screenshot displays the output for the above code.

AngularJS Menu separators

Separators for Context Menu

We can add the separators for particular ContextMenu items by including e-separator class in the required LI elements. Add the following code to display ContextMenu with separator lines.

{% highlight html %}

HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>),within the web page content. HTML tags most commonly come in pairs like and ,although some tags, known as empty elements, are unpaired, for example <img>. The purpose of a web browser is to read HTML documents and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page.
  • Cut
  • Copy
  • Paste
  • Comments
  • Links
  • Clear Formatting

{% endhighlight %}

{% highlight javascript %}

<script type="text/javascript"> angular.module('MenuApp', ['ejangular']) .controller('MenuCtrl', function ($scope) { $scope.type = ej.MenuType.ContextMenu; }); </script>

{% endhighlight %}

{% highlight css %}

<style type="text/css">	
.textarea {
    border: 1px solid;
    padding: 10px;
    position: relative;
    text-align: justify;
    width: 463px;
    color: gray;
}		
</style>

{% endhighlight %}

The following screenshot displays the output for the above code.

AngularJS Menu separators for context menu