我正在玩角2,我想打开一个菜单,在移动设备上以及在PC上的2,3选项。如何打开一个长按住或右键单击Angular2的菜单
我需要的是,当我长保持或div
与class container
上面点击右键,我希望有一个菜单中打开这样的 - 如下
HTML代码:
<div class="container" id="main-wrapper" >
<section class="intro">
<div class="content" >
<h1 [contentEditable]="contentEditable" >You can create full screen sections without javascript.</h1>
<p [contentEditable]="contentEditable">The height is set to 90vh, that means 90% height.</p>
</div>
</section>
</div>
explore.ts
rightClickMenu(){
// What should i write in this function to get a menu as explained.
}
我应该在哪里调用这个菜单,请指导。
检查此[Plunkr](http://plnkr.co/edit/3klGukkbDBCOaBYqcGmr?p=preview)。 –