Tagged: Angular 4
- This topic has 5 replies, 3 voices, and was last updated 6 years, 11 months ago by support-swapna.
-
AuthorPosts
-
smendesParticipantI’m getting these errors:
Identifier ‘codigoOrigem’ is not defined. ‘T’ does not contain such a member.
Identifier ‘uf’ is not defined. ‘T’ does not contain such a member.
Identifier ‘sigla’ is not defined. ‘T’ does not contain such a member.
Identifier ‘descricao’ is not defined. ‘T’ does not contain such a member.Can you guys help me fix it?
mf.data = data: any[]; <tbody> <tr *ngFor="let item of mf.data"> <td>{{ item.codigoOrigem }}</td> <td>{{ item.uf }}</td> <td>{{ item.sigla }}</td> <td>{{ item.descricao }}</td> </tr> </tbody>
support-swapnaModeratorsmendes,
Are you working with nested For loop? There is a known issue with using nested For loops in angular html which is marked with ‘T’ does not contain such a member error. A bug is already filed for the dev team to work on it.
If you are seeing the problem with a normal For loop then please share with us the component.ts code and the component.html code for further investigation.
Apologies for inconvenience caused.
–Swapna
MyEclipse Support
smendesParticipantI’m not working with nested for loop.
I’m using this library: angular2-datatable.Here is the component.ts code because I couldn’t upload it.
import {Component} from '@angular/core'; import {Local} from '../../../model/local'; import {LocalService} from './local.service'; @Component({ selector: 'app-local', templateUrl: './local.component.html', styleUrls: ['./local.component.scss'] }) export class LocalComponent { data: any[]; // I need this to work with angular2-datatable local = new Local(null, null, '0'); ufs = [ {label: 'Selecione...', value: undefined}, {label: 'DF', value: 'DF'}, {label: 'BH', value: 'BH'}, {label: 'SP', value: 'SP'}, {label: 'RJ', value: 'RJ'}, ]; filterQuery = ''; constructor(private localService: LocalService) { localService .getLocais() .subscribe(data => this.data = data); } }
- This reply was modified 7 years, 4 months ago by smendes.
- This reply was modified 7 years, 4 months ago by smendes.
- This reply was modified 7 years, 4 months ago by smendes.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorsmendes,
Thank you for sharing the code files. I see the validation errors with angular2-datatable in an Angular 4 project. I could not replicate the problem in an Angular 2 project.
Can you please clarify if you are working with Angular 2 or Angular 4 project? The angular2-datatable is for Angular 2. Please recheck if the angular2-datatable also works with Angular >=4.0.0.
Please also share with us the project’s package.json file to help us get an overview of your project.
Apologies for inconvenience caused.
–Swapna
MyEclipse Support
saihimajaParticipantERROR:
<td *ngFor=”let formData of _FormData” formGroupName=”OverRideFG”>
<div class=”form-elem form-group form-md-line-input padding-0″
*ngIf=”_jobTaxYears.indexOf(formData?.Year) > -1″>
<select class=”form-control” formControlName={{formData?.Year}}
(change)=”saveValue()”>
<option value=”1″>section A</option>
<option value=”2″>Section B</option>
</select>
</div>
</td>[Angular] Identifier ‘Year’ is not defined. ‘<anonymous>’ does not contain such a member
i am unable to access json object key value in xyz.html page where ever for loop is using
after converting from angular 2 to angular 5.
My version details are :
Angular CLI: 1.5.3
Node: 7.4.0
OS: win32 x64
Angular: 5.0.2
… animations, common, compiler, compiler-cli, core, forms
… http, platform-browser, platform-browser-dynamic
… platform-server, router
@angular/cli: 1.5.3
@angular/typescript: 2.0.0-5d0e199
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.36
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.3
@schematics/angular: 0.1.5
typescript: 2.6.1
webpack: 3.8.1- This reply was modified 6 years, 11 months ago by saihimaja.
support-swapnaModeratorsaihimaja,
Sorry that you are seeing this issue. Thank you for the details. I could not replicate the problem with the code snippet provided and we need the complete code for further investigation.
Can you please send us the zipped project excluding the node_modules folder to help us replicate the problem at our end?
Apologies for inconvenience caused.
–Swapna
MyEclipse Support -
AuthorPosts