Code Monkey home page Code Monkey logo

intellij-angular-inject-into's People

Contributors

slak44 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

intellij-angular-inject-into's Issues

Property Injection

Hello @slak44,

First and foremost thanks for your great plugin!

I have two small feature request. I know that you have probably written the plugin on your own (without a team). If you don't mind I would clone it and create a pull request for it hence work on it. (As soon as I have time). However I first wanted to check if you are currently not working on that exact feature and if you even would be willing to accept the pull request or rather be interested in the features.

First Feature


name: Property injection
about: "Allow the user to configure if they prefer to have constructor or property injection"


Please Describe The Problem To Be Solved
Currently whenever the plugin is used the injection will happen into the constructor. But with Angular 14+ it is possible to also have a property injection.

  formBuilder = inject(FormBuilder);

It would be great to have this ability.

Furthermore I have a second feature which would be awesome:

Second Feature


name: Injection Live Template
about: "Allow the user to define a undefined variable as a property and inject it automatically"


Please Describe The Problem To Be Solved
Example. I often see myself typing as if I would have the property already.
E.g. this.matDialog. <-- Here I realize that I don't have the matDialog as a property yet.
Hence I have to inject it myself. But rather than doing that I would love to be able to write the following.

this.matDialog.inject --> If now I would "TAB" or use the "Intention Actions" two things should happen.

  1. The .inject shall be removed as this was only a "Live Template" abbreviation. Hence this.matDialog$END$ is what will stand there
  2. A new Class Property should be created with the name matDialog.
    private readonly matDialog = inject($INJECTION_TOKEN$)

Something like this would be great in my opinion.
As I said if you don't have the time I will gladly work on it and create a pull request. However it may take some time.
Would you be however interested in those features in your plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.