I have followed these directions but still not working for me. Is there any missing step? I have updated xml, and in my appconfig file appbaseUrl was already like example.com/index.html
Am I missing some configuration in this web.config? let me know the possible fix for this particular issue.
Yes following web.config is already there.
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I have deployed application client: mydomain.com/index.html server: mydomain.com
so for server I have used Visual studio publish and for client(ng2) I have used ng build --prod and copied files under from dist folder to wwwroot(folder on azure).
It works fine but when I go and hit some specific url it donot work, like if I share you url <a class="postlink" href="http://mydomain.com/app/admin/users">http://mydomain.com/app/admin/users</a> and as you to click and navigate you will see no page coming up.
So the problem is client is deployed at mydomain.com/index.html and routing is considering mydomain.com base url. Let me know whats the quick fix to this problem as I'm unable to share url of specific page. Thanks.
(PS: This is not a merged solution where we can deploy both client and server using visual studio)
looking forward
As I have merged both solutions and facing exactly same issue. Also I have followed your instructions on other post but it didn't work at all.
It was and is still working fine with "npm run hmr"/"npm start" "ng build" is still not working even after making these changes. ng build and serve both still telling the same.
I now have merged both solutions for single publish.
Hi, I'm facing same problem is it solved using yarn install ? I have just merged both aspnet core and angular2 solutions following aspnet zero documentation. and in documentation it was mentioned to use npm install? Please let me know if its solved using yarn install?
Still getting same message ng serve You must be inside an angular-cli project in order to use the serve command same for ng build
I have updated my package.json, angular-cli.json , karma.config now I'm getting this error <a class="postlink" href="https://drive.google.com/file/d/0B30VFzGA7ywhT1k1WHpzRS1xSTA/view?usp=sharing">https://drive.google.com/file/d/0B30VFz ... sp=sharing</a>