Freelance Project Requests Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net


Error message with Angular in browser, Console


ReadArticleComponent.html:4 ERROR TypeError: Cannot read property 'title' of



Wrong line in angular code


<h3> {{ article.title }} </h3>


Error description:

An attempt is made to display something in the .html page that does not exist at run time at the first call. Typically, this occurs when data is still being fetched through a web api.





You have to have a ? Add question marks after the variable. The question mark only displays the value if it is not null or just defined.


<h3> {{ article?.title }} </h3>





    at Object.eval [as updateRenderer] (ReadArticleComponent.html:6)

    at Object.debugUpdateRenderer [as updateRenderer] (core.js:45294)

    at checkAndUpdateView (core.js:44277)

    at callViewAction (core.js:44637)

    at execComponentViewsAction (core.js:44565)

    at checkAndUpdateView (core.js:44278)

    at callViewAction (core.js:44637)

    at execEmbeddedViewsAction (core.js:44594)

    at checkAndUpdateView (core.js:44272)

    at callViewAction (core.js:44637)




Contact for Jobs, Project Requests: