Thank Josh, you saved me a ton of time and frustration!
Next drink is on me
Thank Josh, you saved me a ton of time and frustration!
Next drink is on me
thank you very much! saved my life
TY for all your Ionic help… The world is better with this
Thanks alot Yahoooooo <3
Thank you @joshnash
@joshmorony for president
Worked!!!
Thank you Josh!
Great men, thanks, it worked for me
Exactly what i need to fix my issue. Million thanks.
It works perfectly, thank you
To me I get the following error I already made all imports of both the http and the HttpModule but console tells me the following I could do in that case.
Help me please.
XMLHttpRequest cannot load https://stackoverflow.com/questions/44666191/angular-4-angular-cli-error-no-provider-for-object-object No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8100’ is therefore not allowed access.
Thanks You @joshmorony you saved my evening
I used
import {HttpModule} from '@angular/Http’
and it didn’t work.
But when I used
import {HttpModule} from '@angular/http’
it worked.
It seems the imports are CASE-SENSITIVE.
Depends on your filesystem.
Helped me too. Thanks Josh
hi…
Is the procedure for importing/Defining services or modules like http and all in app.module.ts in both “ionic2” and “ionic3” same?? …
I am doing a project in ionic 3 for that I am referring ionic 2 project videos .
please help me
thank you dude, save my time.
in home.ts file i’ve this list of params
var params = {
service: this.toBase64('register'),
device_id: this.toBase64(this.device.uuid),
org_name: this.toBase64(this.orgName),
org_email: this.toBase64(this.orgMail),
org_address: this.toBase64(this.orgAddress),
org_boardnumber: this.toBase64(this.boardNumber),
org_password: this.toBase64(this.password),
org_phone: this.toBase64(this.orgPhone)
}
this.regProvider.postRequest(params)
.subscribe(response => console.log(response))
there is method postRequest()
in Provider there is file register.ts. Here is method implementation.
postRequest(params) {
var headers = new Headers();
headers.append("Accept", 'application/json');
headers.append('Content-Type', 'application/json' );
headers.append('Access-Control-Allow-Origin', '*' );
let options = new RequestOptions({ headers: headers });
let jsonData = JSON.stringify(params)
return this.http.post(this.baseUrl, jsonData, options)
.map(response => response.json());
}
when i run application. this error appears
Screen Shot 2017-11-21 at 12.38.59 PM.png
Can anyone help me where i made mistake.Thanks
thank you! !!!
Thanks! Solved the problem. Had to change it from HttpClient to just Http in the constructor.
Cheers!