Questions tagged as 'angular4'

2
answers

Set background-color from an array of colors

I have a component that is responsible for displaying the values of an array of objects and each object has a series of colors assigned: colores: any = [ {id: 1, c1: '#f0f0f0', c2: '#c8c8c8', c3: '#b4b4b4', c4: 'a0a0a0', c5: '8c8c8c'},...
asked by 30.12.2017 / 18:57
2
answers

How to search for an object in Array?

What I want to achieve is, look for an object in array . Always return -1 whatever you want to say that you can not find any match in array to get your index and then delete that element. I print the array twice, the first...
asked by 01.03.2018 / 16:45
1
answer

Why does it work the same with square brackets and without brackets?

I have a question: <p appAttributeDirectives [color] = green > Look at the attribute color is in a directive that inside has an input that would be the alias and the green attribute is the component.Ts I do not understand why I take...
asked by 18.01.2018 / 17:03
3
answers

Angular4: Why does not http request the service?

import { Injectable } from '@angular/core'; import { Http, Headers,Response } from '@angular/http'; import {Observable} from 'rxjs'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/catch'; @Injectable() export class LugaresService {...
asked by 07.11.2017 / 11:24
0
answers

How to use CryptoJs in angular 4

Good morning, I'm trying to implement CryptoJs in angle 4 but when I run the app it gives me the following error: import { Component } from '@angular/core'; import * as CryptoJS from 'crypto-js'; @Component({ selector: 'home', templ...
asked by 08.11.2017 / 15:41
1
answer

Convert Object to work with the Angular2

I'm working with Angular two with the following JSON: { "var_TempExt": [ { "attrName": "var_TempExt", "attrValue": "8", "recvTime": "2018-02-02T13:57:45.000Z" }, { "at...
asked by 02.02.2018 / 15:04
1
answer

ERROR IN THE INSTALLATION OF ANGULAR IO IN WINDOWS?

Goodnight I have node and npm installed in the latest versions but when installing angular with: npm install -g @angular/cli I get the error sigt:    C: \ WINDOWS \ system32 & nt; npm install -g @ angular / cli   C: \ Users \ David-Edu...
asked by 08.01.2018 / 03:21
1
answer

thousands separator in angular 4

I'm using angle 4 and I want to be able to use a thousands separator pipe for example if the amount is 6000 that appears 6,000, if the amount is 60000 that appears 60,000 and so ... I tried to use some pipes but I can not find one that works...
asked by 07.02.2018 / 18:22
1
answer

Angular Rectangular Form 5: ERROR TypeError: Can not read property 'valid'

The complete message that I get when loading the component (in the initialization of it) is: ERROR TypeError: Can not read property 'valid' of null at ProbaComponent.verifiesValidTouched In the component I define the form like this:...
asked by 19.12.2017 / 13:21
1
answer

angular post method remove character +

I do not really know what is happening, but when I send a form with an angle to the API that I have to enter it into the database if I put it in a string, the '+' character changes it to a space. //Metodo para crear la vivienda crearVivienda...
asked by 27.12.2017 / 09:17