Questions tagged as 'angularjs-2.0'

1
answer

Consume JSON with Angular. Error

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 '{}'...
asked by 07.03.2018 / 14:49
1
answer

use function js of external file inside angular component 2/4/5

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...
asked by 26.02.2018 / 17:13
0
answers

Probelma with mat-expansion-panel in angular 2

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...
asked by 20.02.2018 / 17:19
0
answers

Problem with Angular build prod

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...
asked by 06.02.2018 / 15:39
0
answers

How to use the arrow keys in lists to lower or raise-angle 2

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"...
asked by 09.02.2018 / 19:42
3
answers

Contructor of an array of objects - Angular 2

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...
asked by 17.01.2018 / 16:45
2
answers

Angular data model2

Good morning, I have the following JSON: { "tempext": [ { "attrName": "tempext", "attrValue": "17.054.495", "recvTime": "2017-11-26T18:45:00.000Z" }, { "attrName":...
asked by 12.01.2018 / 17:05
1
answer

Conflicts between Ajax and angular 2

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; };...
asked by 01.12.2017 / 22:43
0
answers

Pass html / html through variable "sanitizer.bypassSecurityTrustResourceUrl" in Angular

--------- iframe.component.ts -------- import { Component, OnInit } from '@angular/core'; import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser'; @Component({ selector: 'app-iframe', templateUrl: './iframe.comp...
asked by 01.12.2017 / 11:20
0
answers

I can not access my api in ExpressJS since Angular generates me errors in which no route concurs

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...
asked by 01.12.2017 / 19:29