Advertisement
Guest User

Untitled

a guest
Apr 8th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'title' of undefined
  2. TypeError: Cannot read property 'title' of undefined
  3. at Object.eval [as updateRenderer] (ng:///AppModule/TapesComponent.ngfactory.js:660:29)
  4. at Object.debugUpdateRenderer [as updateRenderer] (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12658:21)
  5. at checkAndUpdateView (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12037:14)
  6. at callViewAction (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12347:17)
  7. at execComponentViewsAction (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12293:13)
  8. at checkAndUpdateView (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12038:5)
  9. at callWithDebugContext (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:13020:42)
  10. at Object.debugCheckAndUpdateView [as checkAndUpdateView] (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12560:12)
  11. at ViewRef_.detectChanges (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:10129:63)
  12. at RouterOutlet.activateWith (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:5378:42)
  13. at ActivateRoutes.placeComponentIntoOutlet (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4558:16)
  14. at ActivateRoutes.activateRoutes (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4539:26)
  15. at eval (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4475:58)
  16. at Array.forEach (native)
  17. at ActivateRoutes.activateChildRoutes (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4475:29)
  18. at Object.eval [as updateRenderer] (ng:///AppModule/TapesComponent.ngfactory.js:660:29)
  19. at Object.debugUpdateRenderer [as updateRenderer] (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12658:21)
  20. at checkAndUpdateView (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12037:14)
  21. at callViewAction (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12347:17)
  22. at execComponentViewsAction (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12293:13)
  23. at checkAndUpdateView (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12038:5)
  24. at callWithDebugContext (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:13020:42)
  25. at Object.debugCheckAndUpdateView [as checkAndUpdateView] (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:12560:12)
  26. at ViewRef_.detectChanges (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:10129:63)
  27. at RouterOutlet.activateWith (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:5378:42)
  28. at ActivateRoutes.placeComponentIntoOutlet (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4558:16)
  29. at ActivateRoutes.activateRoutes (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4539:26)
  30. at eval (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4475:58)
  31. at Array.forEach (native)
  32. at ActivateRoutes.activateChildRoutes (http://localhost:3000/node_modules/@angular/router/bundles/router.umd.js:4475:29)
  33. at resolvePromise (http://localhost:3000/node_modules/zone.js/dist/zone.js:712:31) [angular]
  34. at resolvePromise (http://localhost:3000/node_modules/zone.js/dist/zone.js:683:17) [angular]
  35. at http://localhost:3000/node_modules/zone.js/dist/zone.js:760:17 [angular]
  36. at Object.onInvokeTask (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:4123:37) [angular]
  37. at ZoneDelegate.invokeTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:397:36) [angular]
  38. at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:165:47) [<root> => angular]
  39. at drainMicroTaskQueue (http://localhost:3000/node_modules/zone.js/dist/zone.js:593:35) [<root>]
  40. at HTMLAnchorElement.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:464:25) [<root>]
  41.  
  42. export class Tape {
  43. constructor (
  44. public id: number,
  45. public title: string,
  46. public date?: string,
  47. public rating?: number,
  48. public description?: string,
  49. public photo?: string){}
  50. }
  51.  
  52. import { Component, OnInit } from '@angular/core';
  53. import { Tape } from './tape'
  54. import { TapeService } from './tape.service';
  55. import { Router } from '@angular/router';
  56. // import { TitlePipe } from './titleFilter';
  57.  
  58. @Component({
  59. selector: 'my-tapes',
  60. templateUrl: './tapes.component.html',
  61. styleUrls: [`./tapes.component.css`],
  62. providers: [TapeService],
  63.  
  64. })
  65. export class TapesComponent implements OnInit {
  66. pageName = 'VHS Movies listing';
  67. tapes: Tape[];
  68. selectedTape: Tape;
  69. model = new Tape(0,'s','s',0,'s','sS');
  70.  
  71. <div class="form-group">
  72. <label for="title">Title{{model.title}}</label>
  73. <input type="text" class="form-control" id="title" required [(ngModel)]="model.title" name="title" #title="ngModel"> Written text: {{tape.title}}
  74. <div [hidden]="title.valid || title.pristine" class="alert alert-danger">
  75. Title is mandatory
  76. </div>
  77. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement