hamzahamidi / angular-forum Goto Github PK
View Code? Open in Web Editor NEWForum application built with Angular
Home Page: https://hamidihamza.com/angular-forum
License: MIT License
Forum application built with Angular
Home Page: https://hamidihamza.com/angular-forum
License: MIT License
problem
data not display on browser although i get data on console.log(data)Angular ?
i need to show employee list of data but problem is not show on browser but if i make console.log(data)
it display as array of object and data show if you make inspect on browser
employeelist.component.html
<div class="col-md-12">
<h2> User Details</h2>
<div class="table-responsive table-container">
<table class="table">
<thead>
<tr>
<th>EmployeeId</th>
<th>BranchCode</th>
<th>EmployeeName</th>
<th>EmployeeAge</th>
<th>JoinDate</th>
<th>BirthDate</th>
<th>Active</th>
</tr>
</thead>
<tbody *ngFor="let doc of documents; let i = index">
<tr *ngFor = "let emp of doc.employees">
<td> {{emp.EmployeeId}}</td>
<td> {{emp.BranchCode}}</td>
<td> {{emp.EmployeeName}}</td>
<td>{{emp.EmployeeAge}}</td>
<td>{{emp.JoinDate}}</td>
<td>{{emp.BirthDate}}</td>
<td>{{emp.Active}}</td>
</tr>
</tbody>
</table>
</div>
</div>
on apiservice file
getEmployees() {
return this.http.get<Employee[]>('https://localhost:44326/api/Employee');
}
on employeelist.component.ts
})
export class EmployeeListComponent implements OnInit {
employees: Employee[];
constructor(private apiservice: ApiService,private toastr : ToastrService) { }
ngOnInit() {
this.apiservice.getEmployees().subscribe((data: Employee[]) => {
this.employees = data;
console.log(this.employees)
});
}
Data show on console.log(this.employee) as following
employeelist.component.ts:18 (2) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]0: {employeeId: 1, branchCode: 1, employeeName: "ahmed", employeeAge: 12, joinDate: "2018-12-12T00:00:00", …}1: {employeeId: 2, branchCode: 1, employeeName: "aziz", employeeAge: 20, joinDate: "2018-12-12T00:00:00", …}2: {employeeId: 3, branchCode: 1, employeeName: "ahmed", employeeAge: 12, joinDate: 85-12-12T00:00:00", …}length: 3__proto__: Array(0)
but on browser data is empty
https://www.mediafire.com/view/rw2lbkvweaojyus/Capture.JPG/file
Hi! Upgrade for Angular 6 please.
How to write the unit test cases for lazy loading in angular 8. i tried a lot but my unit test cases are not covering "loadChildren" routing.
import { Routes, RouterModule } from "@angular/router";
import { AppRoutingComponent } from "./app-routing.component";
const appRoutes: Routes = [
{ path: "index.html", component: AppRoutingComponent },
{ path: "product", loadChildren: () => import('app/dashboard/product.module').then(m => m.ProductModule) },
{ path: "", redirectTo: "/main", pathMatch: "full" } ];
export const routedComponents = [ AppRoutingComponent,
];
@NgModule({
imports: [routing],
exports: [RouterModule]
})
export class AppRoutingModule { }
Please provide some guidance.
Thanks in advance.
import * as firebase from 'firebase/app';
import { Observable } from 'rxjs/Observable';
export interface FirebaseAppConfig {
apiKey?: string;
authDomain?: string;
databaseURL?: string;
storageBucket?: string;
messagingSenderId?: string;
projectId?: string;
}
export interface FirebaseOperationCases {
stringCase: () => firebase.Promise;
firebaseCase?: () => firebase.Promise;
snapshotCase?: () => firebase.Promise;
unwrappedSnapshotCase?: () => firebase.Promise;
Fire base version: 7.13.0
Node version: v10.16.3
Where is the back end API server? Does it located at https://conduit.productionready.io/api? Could you share the source code of the back end API server? Thanks.
Where can I find backend api project to support this angular-forum
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.