user8570495
user8570495

Reputation: 1835

Using angular-cli with apps not started with the CLI

Can the CLI be leveraged for a subset of tasks, for example, to configure AOT for an ng2 app that wasn't created with the CLI?

I reviewed the Angular CLI documentation: https://cli.angular.io/. Looks like the CLI is mainly used to create, maintain and manage independent standalone ng2 apps. I'm guessing that the CLI must generally be used from the very beginning (app creation) in order to reliably use the functions it provides. Is this the case? In my case, I have an ng2 app which I've created within an existing .NET MVC app based on business requirements/needs.

Upvotes: 1

Views: 44

Answers (2)

Chic
Chic

Reputation: 10509

The Angular CLI needs a .angular-cli.json file to be used in a directory. Generally this is not something you would manually create. However, as @Mauricio mentioned, it is not difficult to set up an existing app with the CLI.

The basic process is to start a new project with the CLI and copy your existing code into that project. For a more complete answer, follow the Moving your project to Angular CLI guide from the Angular CLI team.

Upvotes: 0

Mauricio De La Quintana
Mauricio De La Quintana

Reputation: 2442

You can use angular cli with your existing app. Here is a very complete guide by the Angular CLI team.

https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/moving-into-the-cli.md

best regards

Upvotes: 1

Related Questions