# Wijmo_Angular2_Input.Wjcontextmenu

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								WjContextMenu Class
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>Angular 2 directive for context menus.</p>
								</div>
								<p>Use the <b>wjContextMenu</b> directive to add context menus to elements
									on the page. The wjContextMenu directive is based on the <b>wj-menu</b>
									component; it displays a popup menu when the user performs a context menu
								request on an element (usually a right-click).</p>
								<p>The wjContextMenu directive is specified as a parameter added to the
									element that the context menu applies to. The parameter value is a
								reference to the <b>wj-menu</b> component. For example:</p>
								<pre>&lt;!-- paragraph with a context menu --&gt;
&lt;p [wjContextMenu]="menu" &gt;
 This paragraph has a context menu.&lt;/p&gt;

&lt;!-- define the context menu (hidden and with an id) --&gt;
&lt;wj-menu #menu style="display:none"&gt;
 &lt;wj-menu-item [cmd]="cmdOpen" [cmdParam] ="1"&gt;Open...&lt;/wj-menu-item&gt;
 &lt;wj-menu-item [cmd]="cmdSave" [cmdParam]="2"&gt;Save &lt;/wj-menu-item&gt;
 &lt;wj-menu-item [cmd]="cmdSave" [cmdParam]="3"&gt;Save As...&lt;/wj-menu-item&gt;
 &lt;wj-menu-item [cmd]="cmdNew" [cmdParam] ="4"&gt;New...&lt;/wj-menu-item&gt;
 &lt;wj-menu-separator&gt;&lt;/wj-menu-separator&gt;
 &lt;wj-menu-item [cmd]="cmdExit" [cmdParam]="5"&gt;Exit&lt;/wj-menu-item&gt;
&lt;/wj-menu &gt;</pre>
							</div>
						</section>
						<section class="tsd-hierarchy">
							<h3>Heirarchy</h3>
							<ul class="tsd-hierarchy">
								<li>
									<span class="target">WjContextMenu</span>
								</li>
							</ul>
						</section>
					</div>