-
Notifications
You must be signed in to change notification settings - Fork 232
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
Ionic 1.1.0 works with Angular 1.4.3 #222
Comments
I'm also blocked to v0.0.27 because I'm using angular 1.3.8 |
Hi, I'm using Ionic 1.1.0 with ng-token-auth 0.0.28 and I'm having problems because when I test the app from ionic view it does not send any of the headers I don't know if this is a problem because of the version or something related with ionic configuration
bower.json
|
Hi, I keep trying to configure app.factory('authInterceptor', function($injector) {
var authInterceptor = {
request: function(config) {
$injector.invoke(['$http', '$auth', function($http, $auth) {
if (config.url.match($auth.apiUrl())) {
var headers = $auth.retrieveData('auth_headers')
for (property in headers) {
if (headers.hasOwnProperty(property)) {
config.headers[property] = headers[property]
}
}
}
}])
config.headers['header_estatico'] = 'valor'
console.log(config.headers)
return config;
}
}
return authInterceptor;
})
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.interceptors.push('authInterceptor')
}]) I added an additional header for testing the behaviour and found that the static header is sent in the Ionic App, but not the ones obtained wit I'm not sure if these headers exist in the cookies of the ionic app, I can't see the console using Ionic View, I'm using wireshark to see the headers sent from the ionic view app, so I know what is sent, but no what is stored in the cookies. |
Hi, the only problem I have found using So, the solution is simple, not using cookies for storage headers, instead set the config option hope it helps. |
Yes I already use localStorage. My problem was mainly with bower's resolution which didn't want to install ng-token with angular 1.4.3 so during the page load I've got the error "unable to fin the module ng-token". The error is resolved when I manually downgrade the package dependencies. |
This issue is resolved by c0a7783 |
Hi there,
Thanks for you're very useful package.
As you probably know Ionic 1.1 is now released with Angular 1.4.3
but in your bower.json you specified that angular should be at least at 1.4.4. There is a reason to specified this version instead of 1.4.3?
Thanks
The text was updated successfully, but these errors were encountered: