Skip to content

How to integrate the CoreUI-Angular with ASP.Net Core 2.0 #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vardhineedik opened this issue Nov 26, 2017 · 15 comments
Closed

How to integrate the CoreUI-Angular with ASP.Net Core 2.0 #35

vardhineedik opened this issue Nov 26, 2017 · 15 comments

Comments

@vardhineedik
Copy link

Hi

please help me How to integrate the CoreUI-Angular with ASP.Net Core 2.0

Thanks,
Krishna

@xidedix
Copy link
Member

xidedix commented Nov 27, 2017

hi @vardhineedik
there is a tutorial by @mvelosop explaining how to adapt the CoreUI as a base in ASP.NET MVC Core 2 applications https://github.com/mvelosop/AspNetCore2CoreUI

It's not about Angular version of CoreUI specifically, but I suppose it can be useful anyway.

@hozjanmarko
Copy link

Just copy your angular project to the location of your .net core project. Then edit the .angular-cli.json, and set the out dir property from dist to wwwroot (this will save the bundles to /wwwroot on ng build). Edit your startup.cs, so that your mvc app will serve static files.

@vardhineedik
Copy link
Author

vardhineedik commented Nov 28, 2017

thank you @xidedix @hozjanmarko
I am using asp.net core 2.0 angular templet in VisualStudio. in that angular app is web pack so unable to integrate the CoreUI can you help me, please find the project files screenshot
image

@hozjanmarko
Copy link

By the looks of your screenshot... Start with a blank .net core mvc app, move your controller logic, and then proceed like i described in the previous post. You will be better of in the long run by using angular cli

@vardhineedik
Copy link
Author

@hozjanmarko
Thank you, I did same what you say but some issue I am sharing the code with you if you have time please look and solve the problem,
https://github.com/vardhineedik/CoreUiProject
thank you

@hozjanmarko
Copy link

.angular-cli.json"apps": [

{

"root": "src",

"outDir": "wwwroot "

And in startup.cs, before adding use static files add
app.UseDefaultFiles()
Then run ng build, this will populate the wwwroot folder. Then you can do dotnetrun... Or debug in visual studio

@vardhineedik
Copy link
Author

I changed above but no luck . can you solve this, please

@hozjanmarko
Copy link

I will clone it later

@ColinBlair
Copy link

Microsoft has a new Angular template that uses the Angular CLI. Instructions are at aspnet/JavaScriptServices#1288 until the main documentation gets updated. With the new template, just drop CoreUI into the ClientApp folder.

@vardhineedik
Copy link
Author

Hi @ColinBlair
CoreUI not able to add the new template can you guide me any steps for that

Thanks

@Cacanny
Copy link

Cacanny commented Jan 30, 2018

If you're still struggling, I refer to the following: https://www.brandonbarnett.io/blog/2017/06/reference-architecture-angular-4-and-web-api-on-net-core-20-preview-1-with-azure-ad-authentication/

Follow the Web part of this blog, it's very useful and it's serves your purpose. It's not much different what was already said here but maybe it'll give you more information.

@pratishthap
Copy link

Hi all.I am faving the same issue as Krishna. Please guide us how to integrate core ui angular with asp.net core

@pratishthap
Copy link

Did anyone get this working. Please help. I cannot make it work

@gmaynez
Copy link

gmaynez commented May 16, 2020

I have not "integrated" this template with .NET Core. But I used another Angular template and it worked for the .NET Core Web App 3.1 template:

  • Remove VS default ClientApp contents
  • Paste the template files, they have a similar structure
  • Navigate to the ClientApp directory and run from the console npm install -g @angular/cli@latest
  • Then run npm install (this should get all dependencies (node-modules))
  • Click Run on VS and after a little while you should be able to see the template as in the demos.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants