angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Generate component to ClientApp/app/components in ASP. NET Core with Angular Application

Open phuongthuan opened this issue 8 years ago • 3 comments

Hi you guys,

I have stuck when I'm trying to generate a component to ClientApp/app/components. In this ClientApp project ASP NET core. It has three modules are: app.browser.module.ts, app.server.module.ts and app.shared.module.ts.

Now when I type:

ng g c product --module app.shared.module.ts An issue occurred: Error: obs.pipe is not a function obs.pipe is not a function

Can you tell me what's going on or where I'm doing wrong?

phuongthuan avatar Dec 22 '17 09:12 phuongthuan

Hi In my case, the angular.json file was missing in the project. I had created the project using dotnet new angular my-proejct-name

I created another project using "ng new project-name" and copied the angular.json project in root of the project - and set ClientApp in the root property:

"root": "ClientApp"

Angular CLI : 8.3.4 Angular : 4.2.5 Node: 10.16.3


{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "hello-world": {
      "projectType": "application",
      "schematics": {},
      "root": "ClientApp",
      ....

homapm avatar Sep 13 '19 13:09 homapm

Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

filipesilva avatar Oct 08 '19 15:10 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.