I am trying to consume a json with angular and it is giving me the error:
TS2322 error: Type 'Observable < {} | Test > ' is not assignable to type 'Observable'.
Type '{} | Test 'is not assignable to type' Test '.
Type '{}'...
my question is this, I have 2 functions in JavaScript
function checked(id) {
document.getElementById(id).checked = true;}
function unChecked(id) {
document.getElementById(id).checked = false;}
I use these for not being able to check a che...
I'm using the mat-expansion-panel with angle 2. I paste the panels on the google maps map and when I click on any of the panels (none of them have any functions to do when expanding), I focus the map on lat and lng 0. Why could this be happening...
I have created a project in angular cli version 1.6.1 and everything is correct in development mode. However, when compiling with ng build --prod , the friendly path written in the file app.routing.ts , is broken down into two...
I am using the mat-list of angle 2 and could not make clicking the 'down arrow' or 'up arrow' button raise or lower an item in the list. How is this possible?
<mat-list role="list" class="listMinutes">
<mat-list-item role="listitem"...
I am using typescript to program in Angular2. I have an object car.ts the is as follows:
export class Car{
name: String;
door: {
position: String;
id: Number;
};
}
I have initialized the object in t...
Good morning,
I have the following JSON:
{
"tempext": [
{
"attrName": "tempext",
"attrValue": "17.054.495",
"recvTime": "2017-11-26T18:45:00.000Z"
},
{
"attrName":...
I am sending a form with AJAX and everything works fine, the problem is that I need to store the AJAX response in an Angular2 variable.
My code:
xhr.onreadystatechange = function(e) {
this.miVariableAngular = this.responseText;
};...
When I access the URL to my Api:
Angular service:
import { Injectable } from '@angular/core';
import { Code } from './home/Code';
import { Observable } from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
import { catc...