Code Monkey home page Code Monkey logo

angular-forum's People

Contributors

dependabot[bot] avatar hamzahamidi avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-forum's Issues

data not display on browser although i get data on console.log(data)Angular

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

Angular 6

Hi! Upgrade for Angular 6 please.

Karma Unit Test case coverage for lazy loading in Angular 8

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.

getting "Namespace 'firebase' has no exported member 'Promise'.ts(2694)" error while compiling

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.