Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/438.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用带有剪贴板的类?_Javascript_Angularjs - Fatal编程技术网

Javascript 使用带有剪贴板的类?

Javascript 使用带有剪贴板的类?,javascript,angularjs,Javascript,Angularjs,所以我使用了一个名为ngclipboard的指令,但它似乎依赖于使用id,而不依赖于复制元素中的内容。我尝试将它用作一个类,因为我有一个包含数据的整个工作表,并且我只希望将某些数据复制到剪贴板。下面是一个代码段示例: <div class="copyThis"> <div> <p class="wsOutputHead">HYPOTHESIS</p> <p class="outputText" id="hypCriteria">

所以我使用了一个名为ngclipboard的指令,但它似乎依赖于使用
id
,而不依赖于复制元素中的内容。我尝试将它用作一个类,因为我有一个包含数据的整个工作表,并且我只希望将某些数据复制到剪贴板。下面是一个代码段示例:

<div class="copyThis">
<div>
  <p class="wsOutputHead">HYPOTHESIS</p>
  <p class="outputText" id="hypCriteria">We believe that <span >{{ solution || '[solution]' }}</span> will solve <span>{{ (problem != null) ? problem : '[problem]' }}</span> and be valuable to  <span>{{ (customer != null) ? customer : '[customer]' }}</span> while doing <span>{{ (task != null) ? task : '[job to be done]' }}</span>.</p>
</div>
</div>
<div class="copyThis">
          <p class="wsOutputHead">CONCEPT:</p>
<div>
  <p class="outputTextDk">Introduce yourself (and team) and explain the process</p>
  <ul>
    <li class="outputText">"We have been talking to <span>{{ (customer != null) ? customer : '[customer]' }}</span>'s like you about the different problems they experience while doing <span>{{ (task != null) ? task : '[job to be done]' }}</span>."</li>
    <li class="outputText">"We have a few ideas to share with you that might address <span>{{ (problem != null) ? problem : '[problem]' }}</span> to get your feedback. We want to hear your honest thoughts: will the solutions work or not work for you. We also want to hear your vision of solutions and expectations that might address <span>{{ (problem != null) ? problem : '[problem]' }}</span> when doing <span>{{ (task != null) ? task : '[job to be done]' }}</span>."</li>
    <li class="outputText">"There is no right or wrong, we are talking to you about early ideas of how we might make your job easier when doing <span>{{ (task != null) ? task : '[job to be done]' }}</span> before we start coding a new feature/product."</li>
  </ul>
</div>
</div>

假设

我们相信{{solution | |{[solution]}将解决{(problem!=null)?problem:'[problem]'}}并且对{(customer!=null)?customer:'[customer]}在执行{(task!=null)?task:'[job to done]}任务时有价值

概念:

介绍自己(和团队)并解释流程

  • “我们一直在与{{(客户!=null)?客户:'[customer]}和您一样,谈论他们在执行{(任务!=null)?任务:'[job to done]}时遇到的不同问题。”
  • “我们有一些想法可以与您分享,这些想法可能会解决{(问题!=null)?问题:'[problem]}}以获得您的反馈。我们想听听您诚实的想法:这些解决方案对您有效还是无效。我们还想听听您对解决{(问题!=null)的解决方案和期望的看法。”?问题:'[problem]'}当执行{(task!=null)?任务:'[job to Dome]'}时
  • “没有对错之分,我们正在与您讨论如何在开始编写新功能/产品之前,在执行{{(task!=null)?task:'[job to do]'}时简化您的工作的早期想法。”
关于如何让它与一个类一起工作,而不仅仅是一个元素的id,从而实现我所追求的目标,有什么想法吗?否则,有没有更好的图书馆来促进这一点


链接已关闭,可以看到

有人可以在此共享任何内容吗?