1
私はクラス名を持つdivを持っており、そのdivのレンダリングされたコンポーネントを電子メールの本文にテキストとして挿入する方法を見つけようとしています。私の電子メールのためのすべてのものが動作し、私はクラス、NGモデルなどを使って試しました...これを行うには。まだ何も働いていません。角度を使ってdivの内容を電子メールで送信しよう
電子メールを処理するコントローラの私の一部:私はしたい再び
<div class="problemExp" style="background-color: #ffffff; padding: 15px; margin-top: 20px; border: 1px solid #ccc;" ng-model="problemExp">
<div>
<p style="font-size: 12px; color: #afabab;">HYPOTHESIS:</p>
<p style="font-size: 14px;" id="hypCriteria">We believe that <span style="color: blue;">{{ criteria || '[criteria]' }}</span> of <span style="color: blue;">{{ (customer != null) ? customer : '[customer]' }}</span> are most frustrated about <span style="color: blue;">{{ (task != null) ? task : '[task]' }}</span> because <span style="color: blue;">{{ problem || '[problem]' }}</span>.</p>
</div>
<div>
<p style="font-size: 12px; color: #afabab; margin-top: 25px;">CUSTOMER SCREENING CRITERIA:</p>
<p style="font-size: 14px;">We are looking for <span style="color: blue;">{{ (customer != null) ? customer : '[customer]' }}</span> who are regularly involved in <span style="color: blue;">{{ (task != null) ? task : '[task]' }}</span>.</p>
</div>
<div>
<p style="font-size: 12px; color: #afabab; margin-top: 25px;">CUSTOMER INTERVIEW QUESTIONS:</p>
<p style="font-size: 14px;">Tell me about the last time when you were <span style="color: blue;">{{ (task != null) ? task : '[task]' }}</span>?</p>
<p style="font-size: 14px;">What are the major challenges with <span style="color: blue;">{{ (task != null) ? task : '[task]' }}</span>?</p>
<p style="font-size: 14px;">On a scale of 0-10, how frustrating are these problems? Why?</p>
<p style="font-size: 14px;">If you could wave a magic wand and be able to do anything about <span style="color: blue;">{{ (task != null) ? task : '[task]' }}</span> in your daily job, what would it be?</p>
</div>
</div>
、:含まれるように、一度にレンダリングクラスとNG-モデルと
$scope.Subject = "Moneyball Problem Phase Worksheet"
$scope.bodyText = '{{ problemExp }}';
$scope.mailLink = "mailto:" + $scope.emailId + "?subject=" + $scope.Subject + '&body=' + $scope.bodyText;
とのdiv、 HTML要素ではなくテキストです。
どうすればいいですか?
感謝を。私が後にしているのは、実際のタグは含まれていませんが、ここで生成されたテキストです。あなたが{{""}}を見るところでは、私は他の場所の書式のテキストの後ろに書いています。それを達成するための考え方? – Mark
Angularは、このコードが実行される前に埋め込み式 '{{criteria}}'をレンダリングして、レンダリングされたテキストを表示する必要があります。それはしませんでしたか? –
正しい - それは単に電子メールの本文に次のように書いています:HYPOTHESIS:{{criteria || '[criteria]'}} {{(customer!= null)? customer: '[customer]'}}} {{(task!= null)}については、最も不満です。タスク: '[タスク]'}} {{問題|| '[問題]'}}。顧客の審査基準:{{(顧客!= null)を探していますか?顧客: '[customer]'}} {{(task!= null)?タスク: '[タスク]'}}。顧客インタビューの質問:あなたが{{(task!= null)だった最後の時間について教えてください。タスク: '[タスク....... – Mark