Giter Site home page Giter Site logo

ionic 2 provider support about angular2-jwt HOT 4 CLOSED

auth0 avatar auth0 commented on August 15, 2024
ionic 2 provider support

from angular2-jwt.

Comments (4)

escardin avatar escardin commented on August 15, 2024

So should the constructor support a noarg config?

I'm kind of surprised that you can't use provide(); You could totally do that in your root component even if you can't do it in the bootstrap.

from angular2-jwt.

servicepartnerplatform avatar servicepartnerplatform commented on August 15, 2024

Can you tell me how? This is Angular 2 and ionic 2. I didn't see any way to do provide()

I think it does have a noarg ctor but it doesn't play well with injection. I'd also like to be able to set a config object but again doesn't seen like you can do it with ionic 2.

from angular2-jwt.

escardin avatar escardin commented on August 15, 2024

Just going from the docs for App, it looks like you can provide with the providers parameter of the annotation. If that's just ng2 DI (seems like) you should be able to provide something. Ionic would be pretty limiting if you couldn't.

import {provide} from 'angular2/core';

@App({
providers: [ provide(AuthConfig, {
                      useValue: new AuthConfig({})}
                   ),
                   AuthHttp
                 ]
})

from angular2-jwt.

chenkie avatar chenkie commented on August 15, 2024

I can confirm that @escardin's suggestion works. Thanks @escardin !

from angular2-jwt.

Related Issues (20)

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.