Create a Non-Angular library in an Angular application
NickName:Viv Ask DateTime:2018-12-15T07:23:24

Create a Non-Angular library in an Angular application

I need to develop a typescript library in my Angular project and publish it to npm later. I learned that in Angular 6 I could use ng generate library to generate an npm ready library and be able to write and test the library in my application at the same time.

But in my case, the library will be a simple typescript file with some classes wrapped inside. It's not an Angular library since no components or services will be involved. I hope to develop it in my application because I still need the application to provide the data and test the results.

Can I still use ng generate library to do that? Like generate a non-angular library in my Angular application?

Copyright Notice:Content Author:「Viv」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53788129/create-a-non-angular-library-in-an-angular-application

More about “Create a Non-Angular library in an Angular application” related questions

Create a Non-Angular library in an Angular application

I need to develop a typescript library in my Angular project and publish it to npm later. I learned that in Angular 6 I could use ng generate library to generate an npm ready library and be able to...

Show Detail

Integrate an Angular library into a non-angular app

My scenario is as follows: I have built an Angular library that exposes a service, whose dependencies are passed in the constructor I have a separate AWS Lambda function (triggers on cron) that wo...

Show Detail

Protractor throwing exception in synchronization between angular and non-angular

We are developing a protractor jasmine framework for testing the angular part of our application. When we run the script the protractor switches from non-angular to angular without any problem, how...

Show Detail

Alternativa to Protractor for NON-angular project

I need to find the best testing tool for automation of front end in NON-angular project. I was told that Protractor has a bad performance for non-angular testing and was advised to use Puppeteer. H...

Show Detail

Is there any Protractor HTTP Mock library available for non angular applications?

Protractor-http-mock requires angular synchronization so this library can not be used to mock protractor tests for non-angular applications. Can anyone suggest which library will be a best suite to...

Show Detail

Using Angular to Inject into non-Angular Objects

Is there a way to provide a non-Angular injection target to the Angular $injector such that Angular constructs like $http, $scope, $location or $q can be injected into it? //non-angular injection

Show Detail

Calling from a non-angular to an angular page

Question: Can I forward to an angular page from a non-angular page and pass couple of parameters from the non-angular page using form submit (post). Non Angular page (page 1) with a form (param1 and

Show Detail

How to create an Angular wrapper around an existing Javascript library?

I have a pure javascript library that users can install via npm. I want to add/create an Angular "wrapper" to this library so that it can be used seamlessly within Angular projects but I am not su...

Show Detail

How Angular manages non-Angular instances

I have a question about how Angular manages the injection of non-Angular "things" when we try to inject them into a component. In particular, let's take an example and use the ngx-modialog library (

Show Detail

JHipster non-angular landing page

I want to use plain html views in a JHipster project as a landing page. Is there a best practice for a Spring-Boot controller? My goal is to use a non-angular html page for the path "/". The angular-

Show Detail