@basarat I want to use rxjs observables with the fromEvent function. To get it working I need to import them like this:
import ...........
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/fromEvent';
But it keeps underlining it as error:'/home/chocoloper/Downloads/ng/node_modules/rxjs/add/observable/fromEvent.d.ts' is not a module. Please contact the package author to update the package definition.at line 3 col 8
Hi ! Please, how to solve this error?
return this.http.get(webServiceEndpoint + '/species',{
headers: {
'Accept': 'application/json, text/plain, */*',
'Access-Control-Allow-Origin': '*',
'Authorization': sessionStorage.id_token
}
})
Argument of type '{ headers: { string; 'Access-Control-Allow-Origin': string; 'Authorization': any; }; }' is not assignable to parameter of type 'RequestOptionsArgs’.
Property 'id_token' does not exist on type ‘Storage’
Thanks!
I have some more:
.map((species: Array<any>) => {
let result:Array<SpecieModel> = [];
if (species) {
species.species.forEach((specie) => {
Property 'species' does not exist on type 'any[]’
This is for google analytics:
ga('send', 'pageview', '/d');
Cannot find name 'ga’.