TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
bishoe nb
NA
623
80.3k
Property does not exist on type component ng build --prod
Jul 10 2019 1:17 AM
ERROR in src\app\views\home\detalis.component.html(126,21): : Property 'items' does not exist on type 'DetalisComponent'. src\app\views\home\detalis.component.html(127,23):
: Property 'items' does not exist on type 'DetalisComponent'. src\app\views\home\detalis.component.html(128,23): :
Property 'items' does not exist on type 'DetalisComponent'. src\app\views\home\detalis.component.html(129,37): : Property 'items' does not exist on type 'DetalisComponent'.
INewsModule
import
{ Injectable } from
'@angular/core'
;
@Injectable({
providedIn:
'root'
})
export
class
ICategoryModule {
public
NameCategory:string;
public
DateCategory?:Date;
IDCategoery?:number;
}
//
export
interface
INewsModule{
IDNews:number;
IDCategoery:number;
NameNews:string;
TopicNews:string;
DateNews?:Date;
ImageCaption:string;
ImageName:string ;
}
import
{ Component, OnInit, Input, Injectable } from
'@angular/core'
;
import
{ NewsService } from
'../../serv/news.service'
;
import
{ ActivatedRoute } from
'@angular/router'
;
import
{ INewsModule } from
'../../Class/i-news/i-news.module'
;
import
{ FormsModule } from
'@angular/forms'
;
import
{Http , Response , Headers , RequestOptions ,RequestMethod, } from
'@angular/http'
;
import
{ ISubscription } from
'rxjs/Subscription'
;
import
{ HttpClient } from
'@angular/common/http'
;
import
{ retry } from
'rxjs-compat/operator/retry'
;
@Component({
selector:
'app-detalis'
,
templateUrl:
'./detalis.component.html'
,
styleUrls: [
'./detalis.component.scss'
],
providers:[NewsService]
})
export
class
DetalisComponent
implements
OnInit {
subscription: ISubscription;
statusMessage: string =
'please wait Loading data ... :D'
;
public
items : INewsModule[];
constructor(
public
_NewsService : NewsService,
public
_activeRoute: ActivatedRoute,
public
_HttpClient: HttpClient
) { }
// private items :any[]= [];
ngOnInit() {
let id : number =
this
._activeRoute.snapshot.params[
'id'
];
this
._NewsService.getdetails(id).retryWhen((err) => {
return
err.scan((retryCount) =>{
retryCount +=1;
if
(retryCount < 6 ){
this
.statusMessage =
'Retrying .....Attept #'
+ retryCount;
return
retryCount;
}
else
{
throw
(err);
}
}, 0).delay(1000)
})
.subscribe((newsdata) => {
if
(newsdata ==
null
){
this
.statusMessage =
'code does not exist'
;
}
else
{
this
.items = newsdata
}
},
(error) =>{
this
.statusMessage =
"please try again after sometime"
console.log(error);
})
}
}
<!DOCTYPE html
>
<
html
lang
=
"zxx"
class
=
"no-js"
>
<
head
>
<!-- Mobile Specific Meta -->
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<!-- Favicon-->
<
link
rel
=
"shortcut icon"
href
=
"/assets/img/fav.png"
>
<!-- Author Meta -->
<
meta
name
=
"author"
content
=
"colorlib"
>
<!-- Meta Description -->
<
meta
name
=
"description"
content
=
""
>
<!-- Meta Keyword -->
<
meta
name
=
"keywords"
content
=
""
>
<!-- meta character set -->
<
meta
charset
=
"UTF-8"
>
<!-- Site Title -->
<
title
>
Magazine
</
title
>
<!--
CSS
============================================= --
>
</
head
>
<
body
>
<
header
>
<
div
class
=
"header-top"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-6 col-md-6 col-sm-6 col-6 header-top-left no-padding"
>
<
ul
>
<
li
>
<
a
href
=
"#"
>
<
i
class
=
"fa fa-facebook"
>
</
i
>
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
i
class
=
"fa fa-twitter"
>
</
i
>
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
i
class
=
"fa fa-dribbble"
>
</
i
>
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
i
class
=
"fa fa-behance"
>
</
i
>
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-6 col-md-6 col-sm-6 col-6 header-top-right no-padding"
>
<
ul
>
<
li
>
<
a
href
=
"tel:+440 012 3654 896"
>
<
span
class
=
"lnr lnr-phone-handset"
>
</
span
>
<
span
>
+440 012 3654
896
</
span
>
</
a
>
</
li
>
<
li
>
<
a
href
=
"mailto:
[email protected]
"
>
<
span
class
=
"lnr lnr-envelope"
>
</
span
>
<
span
>
[email protected]
</
span
>
</
a
>
</
li
>
</
ul
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"logo-wrap"
>
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-between align-items-center"
>
<
div
class
=
"col-lg-4 col-md-4 col-sm-12 logo-left no-padding"
>
<
a
href
=
"index.html"
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/logo.png"
alt
=
""
>
</
a
>
</
div
>
<
div
class
=
"col-lg-8 col-md-8 col-sm-12 logo-right no-padding ads-banner"
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/banner-ad.jpg"
alt
=
""
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"container main-menu"
id
=
"main-menu"
>
<
div
class
=
"row align-items-center justify-content-between"
>
<
nav
id
=
"nav-menu-container"
>
<
ul
class
=
"nav-menu"
>
<
li
class
=
"menu-active"
>
<
a
href
=
"index.html"
>
Home
</
a
>
</
li
>
<
li
>
<
a
href
=
"archive.html"
>
Archive
</
a
>
</
li
>
<
li
>
<
a
href
=
"category.html"
>
Category
</
a
>
</
li
>
<
li
class
=
"menu-has-children"
>
<
a
href
=
""
>
Post Types
</
a
>
<
ul
>
<
li
>
<
a
href
=
"standard-post.html"
>
Standard Post
</
a
>
</
li
>
<
li
>
<
a
href
=
"image-post.html"
>
Image Post
</
a
>
</
li
>
<
li
>
<
a
href
=
"gallery-post.html"
>
Gallery Post
</
a
>
</
li
>
<
li
>
<
a
href
=
"video-post.html"
>
Video Post
</
a
>
</
li
>
<
li
>
<
a
href
=
"audio-post.html"
>
Audio Post
</
a
>
</
li
>
</
ul
>
</
li
>
<
li
>
<
a
href
=
"about.html"
>
About
</
a
>
</
li
>
<
li
>
<
a
href
=
"contact.html"
>
Contact
</
a
>
</
li
>
</
ul
>
</
nav
>
<!-- #nav-menu-container -->
<
div
class
=
"navbar-right"
>
<
form
class
=
"Search"
>
<
input
type
=
"text"
class
=
"form-control Search-box"
name
=
"Search-box"
id
=
"Search-box"
placeholder
=
"Search"
>
<
label
for
=
"Search-box"
class
=
"Search-box-label"
>
<
span
class
=
"lnr lnr-magnifier"
>
</
span
>
</
label
>
<
span
class
=
"Search-close"
>
<
span
class
=
"lnr lnr-cross"
>
</
span
>
</
span
>
</
form
>
</
div
>
</
div
>
</
div
>
</
header
>
<
div
class
=
"site-main-container"
>
<!-- Start top-post Area -->
<
section
class
=
"top-post-area pt-10"
>
<
div
class
=
"container no-padding"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-12"
>
<
div
class
=
""
>
<
table
class
=
"blueTable"
style
=
"height: 212px;"
width
=
"333"
>
<
thead
>
<
tr
>
<
th
>
NameNews
</
th
>
<
th
>
TopicNews
</
th
>
<
th
>
Date
</
th
>
<
th
>
Image
</
th
>
</
tr
>
</
thead
>
<
tfoot
>
<
tr
>
<
td
colspan
=
"4"
>
<
div
class
=
"links"
>
</
div
>
</
td
>
</
tr
>
</
tfoot
>
<
tbody
>
<
tr
>
<
td
>
{{items.NameNews}}
</
td
>
<
td
>
{{items.TopicNews}}
</
td
>
<
td
>
{{items.DateNews}}
</
td
>
<
td
>
<
img
class
=
""
src
=
"http://localhost:56181/Image/{{items.ImageName}}"
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
<
p
class
=
"text-white link-nav"
>
<
a
href
=
"index.html"
>
Home
</
a
>
<
span
class
=
"lnr lnr-arrow-right"
>
</
span
>
<
a
href
=
"category.html"
>
Posts Category
</
a
>
</
p
>
</
div
>
</
div
>
<
div
class
=
"col-lg-12"
>
<
div
class
=
"news-tracker-wrap"
>
<
h6
>
<
span
>
Breaking News:
</
span
>
<
a
href
=
"#"
>
Astronomy Binoculars A Great Alternative
</
a
>
</
h6
>
</
div
>
</
div
>
</
div
>
</
div
>
</
section
>
<!-- End top-post Area -->
<!-- Start latest-post Area -->
<
section
class
=
"latest-post-area pb-120"
>
<
div
class
=
"container no-padding"
>
<
div
class
=
"row"
>
<
div
class
=
"col-lg-8 post-list"
>
<!-- Start latest-post Area -->
<
div
class
=
"latest-post-wrap"
>
<
h4
class
=
"cat-title"
>
Latest News
</
h4
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/l1.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Lifestyle
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
class
=
"excert"
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/l2.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Science
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/l3.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Travel
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/l4.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Fashion
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/r1.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Science
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/r2.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Travel
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"single-latest-post row align-items-center"
>
<
div
class
=
"col-lg-5 post-left"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/r3.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Fashion
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"col-lg-7 post-right"
>
<
a
href
=
"image-post.html"
>
<
h4
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06 Comments
</
a
>
</
li
>
</
ul
>
<
p
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.
</
p
>
</
div
>
</
div
>
<
div
class
=
"load-more"
>
<
a
href
=
"#"
class
=
"primary-btn"
>
Load More Posts
</
a
>
</
div
>
</
div
>
<!-- End latest-post Area -->
</
div
>
<
div
class
=
"col-lg-4"
>
<
div
class
=
"sidebars-area"
>
<
div
class
=
"single-sidebar-widget editors-pick-widget"
>
<
h6
class
=
"title"
>
Editor’s Pick
</
h6
>
<
div
class
=
"editors-pick-post"
>
<
div
class
=
"feature-img-wrap relative"
>
<
div
class
=
"feature-img relative"
>
<
div
class
=
"overlay overlay-bg"
>
</
div
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/e1.jpg"
alt
=
""
>
</
div
>
<
ul
class
=
"tags"
>
<
li
>
<
a
href
=
"#"
>
Travel
</
a
>
</
li
>
</
ul
>
</
div
>
<
div
class
=
"details"
>
<
a
href
=
"image-post.html"
>
<
h4
class
=
"mt-20"
>
A Discount Toner Cartridge Is
Better Than Ever.
</
h4
>
</
a
>
<
ul
class
=
"meta"
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-user"
>
</
span
>
Mark wiens
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-calendar-full"
>
</
span
>
03 April, 2018
</
a
>
</
li
>
<
li
>
<
a
href
=
"#"
>
<
span
class
=
"lnr lnr-bubble"
>
</
span
>
06
</
a
>
</
li
>
</
ul
>
<
p
class
=
"excert"
>
Lorem ipsum dolor sit amet, consecteturadip isicing elit, sed do eiusmod tempor incididunt ed do
eius.
</
p
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"single-sidebar-widget ads-widget"
>
<
img
class
=
"img-fluid"
src
=
"/assets/img/sidebar-ads.jpg"
alt
=
""
>
</
div
>
<
h6
class
=
"title"
>
Social Networks
</
h6
>
<
ul
class
=
"social-list"
>
<
li
class
=
"d-flex justify-content-between align-items-center fb"
>
<
div
class
=
"icons d-flex flex-row align-items-center"
>
<
i
class
=
"fa fa-facebook"
aria-hidden
=
"true"
>
</
i
>
<
p
>
983 Likes
</
p
>
</
div
>
<
a
href
=
"#"
>
Like our page
</
a
>
</
li
>
<
li
class
=
"d-flex justify-content-between align-items-center tw"
>
<
div
class
=
"icons d-flex flex-row align-items-center"
>
<
i
class
=
"fa fa-twitter"
aria-hidden
=
"true"
>
</
i
>
<
p
>
983 Followers
</
p
>
</
div
>
<
a
href
=
"#"
>
Follow Us
</
a
>
</
li
>
<
li
class
=
"d-flex justify-content-between align-items-center yt"
>
<
div
class
=
"icons d-flex flex-row align-items-center"
>
<
i
class
=
"fa fa-youtube-play"
aria-hidden
=
"true"
>
</
i
>
<
p
>
983 Subscriber
</
p
>
</
div
>
<
a
href
=
"#"
>
Subscribe
</
a
>
</
li
>
<
li
class
=
"d-flex justify-content-between align-items-center rs"
>
<
div
class
=
"icons d-flex flex-row align-items-center"
>
<
i
class
=
"fa fa-rss"
aria-hidden
=
"true"
>
</
i
>
<
p
>
983 Subscribe
</
p
>
</
div
>
<
a
href
=
"#"
>
Subscribe
</
a
>
</
li
>
</
ul
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
section
>
<!-- End latest-post Area -->
</
div
>
<!-- start footer Area -->
<!-- End footer Area -->
</
body
>
</
html
>
Reply
Answers (
9
)
Angular mat-checkbox
Angular with ag-grid