例如,我在标题键中有一个字符串为 Sebamed Baby Wash Extra Soft 400Ml,我想将其反转为“Sebamed ybab Wash artxE Soft lM004”。如何反转它是否有任何像反转字符串的角管。我在模板的卡片中提到过作为反向标题来显示反向字符串。
<html component>
<div class="card bg-light mb-3" style="max-width: 640px;" *ngFor="let
item1 of myResponse">
<div class="card-header">Product Info</div>
<div class="row no-gutters">
<div class="col-md-4">
<img src="{{item1.Images}}" class="card-img" alt="...">
</div>
<div class="col-md-8">
<div class="card-body">
<h5 class="card-title">Product Name: {{item1.Title}}</h5>
<h5 class="card-title">Reverse Name: {{item1.Title}}</h5>
<p class="card-text">Category: {{item1.Category}}</p>
<p class="card-text">ASIN: {{item1.ASIN}}</p>
<p class="card-text">Details: {{item1.Details}}</p>
</div>
</div>
</div>
<br>
<a [routerLink]="['/list']" class="btn btn-dark inline-block">Go
Back</a>
</div>
/>
</ component.ts
import { Component, OnInit } from '@angular/core';
/*importing services*/
import { DealsService } from '../deals.service'
@Component({
selector: 'app-details',
templateUrl: './details.component.html',
styleUrls: ['./details.component.css']
})
export class DetailsComponent implements OnInit {
public myResponse;
constructor(public dealsHttpService : DealsService) {
console.log('Details component constructor is called');
}
ngOnInit() {
console.log('Details component onInit called');
this.myResponse = JSON.parse(localStorage.getItem('details'));
console.log(this.myResponse)
return this.myResponse;
}
}
/>
</localstorage json data
ASIN: "B00VFJWGCA"
Actual Discount: "22.0%"
After_Price: "721"
BeforePrice: "920"
Category: "Baby Grooming"
Deal Check: "Deal"
Details: "['Made in Germany', 'Squalene supports the lipid barrier of
babies and children', 'Sugar based mild cleanser, botanical lipids similar
to vernix, allantoin', 'Instructions Included']"
Discount % Threshold: "15%"
Images: "https://images-eu.ssl-images-amazon.com/images/I/41X6IolhHGL.jpg
|| https://images-eu.ssl-images-amazon.com/images/I/51Gqjo%2B7zgL.jpg"
Rank: "1.0"
Title: "Sebamed Baby Wash Extra Soft 400Ml"