{"id":1869,"date":"2017-02-23T13:03:27","date_gmt":"2017-02-23T13:03:27","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=1869"},"modified":"2018-10-10T17:15:58","modified_gmt":"2018-10-10T17:15:58","slug":"angular2-tour-of-heroes-tutorial-issues-and-learning-points","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=1869","title":{"rendered":"Angular2 Tour of Heroes Tutorial &ndash; Issues and Learning Points"},"content":{"rendered":"<p>Whilst adding the changes to for 2 way data binding by adding the new file <em>src\/app\/app.module.ts<\/em> as detailed <a href=\"https:\/\/angular.io\/docs\/ts\/latest\/tutorial\/toh-pt1.html\">here<\/a>, VS Code reported the following errors:-<\/p>\n<blockquote><p>[ts] Cannot find module &#8216;@angular\/core&#8217;. (1,24)<br \/>\n[ts] Cannot find module &#8216;@angular\/platform-browser&#8217;. (2,31)<br \/>\n[ts] Cannot find module &#8216;@angular\/forms&#8217;. (3,31)<\/p><\/blockquote>\n<p>The compilation was not affected and the app worked.<\/p>\n<p>The notes state that you should <em>add it to the NgModuledecorator&#8217;s imports array, <\/em>however this decorator and indeed the above file were not even present in the project.<\/p>\n<p>Having looked into it, it appears that the available git repos do not match the tutorial notes! Annoying! There might be a VS Code issue but it looks likely that it is a repo issue.<\/p>\n<p>The standard repo is <a href=\"https:\/\/github.com\/johnpapa\/angular2-tour-of-heroes\">here<\/a>. This appears to already have the changes listed above for\u00a0 app.module.ts, so is not suitable for starting the tutorial.<\/p>\n<p>The version I used from Rob Lourens, which contains the launch.json configurations for VS Code, is <a href=\"https:\/\/devhub.io\/repos\/roblourens-angular2-tour-of-heroes\">here<\/a>. This is different again, and still does not match the tutorial start!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whilst adding the changes to for 2 way data binding by adding the new file src\/app\/app.module.ts as detailed here, VS Code reported the following errors:- [ts] Cannot find module &#8216;@angular\/core&#8217;. (1,24) [ts] Cannot find module &#8216;@angular\/platform-browser&#8217;. (2,31) [ts] Cannot find module &#8216;@angular\/forms&#8217;. (3,31) The compilation was not affected and the app worked. The notes state [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[198],"tags":[199,13],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1869"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1869"}],"version-history":[{"count":3,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1869\/revisions"}],"predecessor-version":[{"id":1878,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1869\/revisions\/1878"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}