Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. class AppComponent {
  2.  
  3. dish = {};
  4.  
  5. loadDishWindow(){
  6. console.log(this.dish);
  7. //->Object {}
  8.  
  9. this.dish = {
  10. attributes : [],
  11. id : null ,
  12. name : "",
  13. type : null,
  14. type_id: null,
  15. unit: null,
  16. unit_id: null
  17. };
  18.  
  19. console.log(this.dish);
  20. //->Object {attributes: Array[0], id: null, name: "", type: null, type_id: null…}
  21.  
  22. }
  23.  
  24. error TS2339: Property 'name' does not exist on type '{}'.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement