*ngFor issue
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[X] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
I have this code
<div *ngFor="let service of services">
<span><img [src]="service.imgPath" alt="{{ service.name }}"/></span>
<h4>{{ service.name}}</h4>
<p>{{ service.desc }}</p>
</div>
And .json file
"service":[
{ "name" : "someName1", "desc" : "someDesc1"},
{ "name" : "someName2", "desc" : "someDesc2"},
{ "name" : "someName3", "desc" : "someDesc3"}
]
How can I do translation of each service that have 2 parameters
In regular case I use {{ ‘something’ | translate }} , where “something” is placed in .json file
“something” : “translation” So how can a use it in state of ngFor? It read me an object from .json, but not array of objects that what I need in my case
-
ngx-translate version: 7.0.0
-
Angular version: 4.0.0
-
Browser: [all]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:15
Top Results From Across the Web
Angular NgFor Issue - typescript - Stack Overflow
I am trying to display the list of the object having id and name using NgFor directive but i am getting below ...
Read more >Angular ngFor - Learn All Features, Not Only For Arrays
Let's learn a ton of hidden ngFor features that are not often ... still run into performance issues and notice that the UI...
Read more >Problem with ngFor · Issue #8602 · angular/angular - GitHub
I got this error: Cannot assign to a reference or variable! ... testItems is an array of string. If it was an array...
Read more >NgForOf - Angular
The ngForOf directive is generally used in the shorthand form *ngFor . In this form, the template to be rendered for each iteration...
Read more >Angular Ngfor Issue - StackBlitz
Starter project for Angular apps that exports to the Angular CLI.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I’m closing this issue because it’s too old. If you have a similar problem with recent version of the library, please open a new issue.
That’s weird… because that’s how my project is working. I’m using it like this
The json is structured like this