-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to version 4 #49
Comments
microsoft/TypeScript#1887 |
@ronzeidman Thanks for your reply. Do you know why this is happening? In your sample you don't do explicit convert. In case ng2-ui-auth types is registered in typings this could be solved without use an explicit convert? |
Hi i have same issue please help I have tried using |
"No provider for AuthService" means that you didn't provide the Ng2UiAuthModule to your base module. Can you share how you initialize your main module? |
@ronzeidman sorry my bad that issue was from my side now it is resolved. |
Updated the readme... I'll try to fix this later... it will probably be a breaking change though (I'll use an interface instead of a class for it...) |
@diegodfsd I can't seem to be able to reproduce the type issue, what typescript version are you using? |
@ronzeidman I was using version 1.8.10 and now I update to 2.03 but the error continue if I remove the explicit conversion.
|
What's your tsconfig.json? |
My tsconfig.json
|
Can you try with version 4.1.0 typescript 2.0.3 and use |
@types? How do I use it? |
Remove typings library and install typings from npm: |
@ronzeidman I tried install as you recommended but something went wrong.
Do you have any idea about what's happening? |
@types like typings is only required for JS libraries. TS libraries have their type definitions built-in |
make sense. so do you have an alternative to avoid explicit conversion? |
It shouldn't be an issue... I gave you my settings and they don't reproduce the issue |
are you sure? because I'm just install your package like I did with othera and only with ng2-ui-auth I got this error. Are you import your package directly from source or from npm install? |
npm install. Try to compile the https://github.com/ronzeidman/ng2-ui-auth-example |
try adding the following to your tsconfig: |
@ronzeidman I tried change my tsconfig.json but when I remove the explicit conversion I get this error messages:
I don't have ideia what's the problem. I have changed my tsconfig to include some keys that I took from ng2-ui-auth-example but the errors persist. I don't know if this could be the problem, but I'm using gulp + systemjs while you are using webpack. This is my tsconfig.json
My configuration
When I run the ng2-ui-auth-example everything works fine. |
I have no idea. export class MyAuthConfig extends CustomConfig {
defaultHeaders: { [name: string]: string; } = { 'Content-Type': 'application/json' };
baseUrl = ConfigService.BASE_ADDRESS;
tokenPrefix = 'locaoffice';
loginUrl = '/api/sessions';
signupUrl = '/api/users';
providers = <any>{
google: {
clientId: '***********',
scope: ['profile',
'email'
]
},
facebook: {
clientId: '*********',
scope: ['public_profile',
'email'
]
}
};
} That should resolve the error |
If anyone can provide a solution I'll be happy to accept, in the meantime I'm closing since there is a workable workaround. |
After update to version 4 and tried to follow the instructions to extend the CustomConfig I'm get this error message in my building process.
This is my auth settings class
I don't know where is the problem.
The text was updated successfully, but these errors were encountered: