- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2022 07:35 AM
i want to create a "<p>" element in my html with angulajs how can i do?
if(response.data.prefReport.length){
getReport(response.data.prefReport);
}else {
//code here...
}
html:
<div>
<div style="width: 60%;margin: auto;padding: 20px 0;margin-bottom: 25px;">
<sn-record-picker field="c.report"
table="'sys_report'"
display-field="'title'"
display-fields="'table'"
value-field="'sys_id'"
default-query="'type=pivot'"
search-fields="'title'"
page-size="100">
</sn-record-picker>
</div>
<div>
</div>
<div ng-show="c.data.show_report_widget">
<div style="display: flex;justify-content: space-between;margin-bottom: 20px;">
<h4>
{{c.data.reportTitle}}
</h4>
<button class="btn btn-primary" ng-click="c.exportTableToExcel('pvtTable', 'ccccc')">
Export Excel
</button>
</div>
<div id="output"></div>
</div>
<div class="loading-container" ng-if="c.data.loadingOn">
<span class="icon icon-loading icon-lg-spc"></span>
</div>
</div>
Solved! Go to Solution.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 10:01 AM
You can't just create an element. You have to have an HTML element that you populate in your JS.
Where you have your //code here... , set a value, ex: a message.
//code here...
response.message = "No report to display"
in your HTML, add an element such as:
<div ng-if="c.data.message">
<p>{{c.data.message"}} </p>
</div>
Hit the 👍 Helpful or Accept link ↓ if this answer brings you closer to achieving your goal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2022 10:01 AM
You can't just create an element. You have to have an HTML element that you populate in your JS.
Where you have your //code here... , set a value, ex: a message.
//code here...
response.message = "No report to display"
in your HTML, add an element such as:
<div ng-if="c.data.message">
<p>{{c.data.message"}} </p>
</div>
Hit the 👍 Helpful or Accept link ↓ if this answer brings you closer to achieving your goal