Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Hi, I have installed the the first time the power tools and created new entity (fully auditied of Guid) and associated module, rebuilt the host project, run nswag update as outlined in the documentation Angular has recompiled but now gives the following exception
core.js:4081 ERROR Error: Uncaught (in promise): Error: Component 'CompaniesComponent' is not resolved: templateUrl: ./companies.component.html
Did you run and wait for 'resolveComponentResources()'?
Error: Component 'CompaniesComponent' is not resolved: templateUrl: ./companies.component.html
Did you run and wait for 'resolveComponentResources()'?
at Function.get (core.js:25940)
at getComponentDef (core.js:1833)
at verifyDeclarationsHaveDefinitions (core.js:25637)
at Array.forEach (``)
at verifySemanticsOfNgModuleDef (core.js:25609)
at Function.get (core.js:25567)
at getInjectorDef (core.js:395)
at R3Injector.processInjectorType (core.js:11114)
at core.js:10986
at core.js:1136
at resolvePromise (zone.js:832)
at resolvePromise (zone.js:784)
at zone.js:894
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:27126)
at ZoneDelegate.invokeTask (zone.js:420)
at Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:601)
As this appeared to be an angular error I dug around and found that the resolution to this issue was to add an explicit module id to the component declaration like this
<span class="colour" style="color: rgb(212, 212, 212);">@</span><span class="colour" style="color: rgb(78, 201, 176);">Component</span><span class="colour" style="color: rgb(212, 212, 212);">({</span> <span class="colour" style="color: rgb(156, 220, 254);">templateUrl</span><span class="colour" style="color: rgb(156, 220, 254);">:</span><span class="colour" style="color: rgb(212, 212, 212);"> </span><span class="colour" style="color: rgb(206, 145, 120);">'./companies.component.html'</span><span class="colour" style="color: rgb(212, 212, 212);">,</span> <span class="colour" style="color: rgb(156, 220, 254);">encapsulation</span><span class="colour" style="color: rgb(156, 220, 254);">:</span><span class="colour" style="color: rgb(212, 212, 212);"> </span><span class="colour" style="color: rgb(78, 201, 176);">ViewEncapsulation</span><span class="colour" style="color: rgb(212, 212, 212);">.</span><span class="colour" style="color: rgb(79, 193, 255);">None</span><span class="colour" style="color: rgb(212, 212, 212);">,</span> <span class="colour" style="color: rgb(156, 220, 254);">animations</span><span class="colour" style="color: rgb(156, 220, 254);">:</span><span class="colour" style="color: rgb(212, 212, 212);"> [</span><span class="colour" style="color: rgb(220, 220, 170);">appModuleAnimation</span><span class="colour" style="color: rgb(212, 212, 212);">()],</span> <span class="colour" style="color: rgb(156, 220, 254);">moduleId</span><span class="colour" style="color: rgb(156, 220, 254);">:</span><span class="colour" style="color: rgb(212, 212, 212);"> </span><span class="colour" style="color: rgb(156, 220, 254);">module</span><span class="colour" style="color: rgb(212, 212, 212);">.</span><span class="colour" style="color: rgb(156, 220, 254);">id</span> <span class="colour" style="color: rgb(212, 212, 212);">})</span> <span class="colour" style="color: rgb(212, 212, 212);"></span> Is this a bug in the power tools, or have I done something wrong? Please advise if I should update the template (and how) or if I need to do something else to enable use of the power tools correctly.
Kind Regards, AJ.
Hi There,
I have successfully created my own custom modules (core, shared, application etc) to hold my own code, so that all code I write is kept in separate modules and separate .net projects from the supplied Zero code - However, the 1 area I can't seem to work out from the documentation is can I add a second DBContext for my entities so this too can be kept separate from the supplied code in it's own module?
I will use the same connection string, but in my context will specify a schema name so SQL Server will treat my context as a separate DB in the same file.
Thankyou in advance for your guidance.
AJ.