Giter VIP home page Giter VIP logo

angular-plugin-architecture's People

Contributors

ionepaul avatar wernerva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-plugin-architecture's Issues

License

Paul,

Any chance that you could provide a license for this? (BSD, MIT, etc?)

Cheers,

:w

ReferenceError : SystemJS is not defined

After importing SystemJS properly in main.js , I got the error :

Uncaught ReferenceError: SystemJS is not defined
at Object.../../../../../src/main.ts (main.ts:13)

Could you please help me in resolving the error ?

FYI : I am using Angular4.

Dependency Injection

I am trying to use DatePipe in the Plugin Component but getting Error, Am I missing somthing here?
constructor(private datePipe: DatePipe) { }

ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[PluginAComponent -> DatePipe]: 
  StaticInjectorError(Platform: core)[PluginAComponent -> DatePipe]: 
    NullInjectorError: No provider for DatePipe!
Error: StaticInjectorError(AppModule)[PluginAComponent -> DatePipe]: 
  StaticInjectorError(Platform: core)[PluginAComponent -> DatePipe]: 
    NullInjectorError: No provider for DatePipe!

Plugin dependency injection

Is there a way to inject in a plugin constructor, a class provided by core-app ?

In fact I would like:

Have an abstract class

export declare abstract class IPluginComponent {
    abstract methodDeclaredInCoreApp(first: String, last: String): String;
    abstract anotherMethod(): any;
}

My plugin component which use the interface

constructor(private srvInterface: IPluginComponent) { }

  public onSubmit() {
        this.result = this.srvInterface.methodDeclaredInCoreApp(this.first, this.last);
  }

And in the coreApp realize the IPluginComponent implementation

export class PluginInterface implements IPluginComponent {
    methodDeclaredInCoreApp(first: String, last: String): String {
        return first + ' @ ' + last;
    }    
    
    anotherMethod(): any {
        return 42;
    }    

}

Finally I've make some tries but it fails at runtime on

// compile module
const moduleFactory = await this._compiler.compileModuleAsync<any>(module["PluginAModule"]);

My console error :
Error: Can't resolve all parameters for PluginAComponent: (?).

AOT build error

image
when i run the core-app by ng serve --aot, the app can not work , any solutions?

App not building

I cloned the repo, ran npm install and the npm start. The build failed with:

ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.

I've created a pull request with the fix (update typescript version from ~2.7.2 to ^2.8.0

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.