Questions tagged as 'angular'

1
answer

How to import an existing project with angular-cli

Hello, I downloaded an angled 4 project with css bootstrap, I would now like to work on this project, making some changes for study effect. It turns out that I do not know how to make an amount of this already existing project to run it with the...
asked by 16.01.2018 / 16:43
1
answer

NullInjectorError Error: No provider for

I'm having this error message: ERROR Error: StaticInjectorError[CervejaService]: StaticInjectorError[CervejaService]: NullInjectorError: No provider for CervejaService! at _NullInjector.get (core.js:993) at resolveToken (core.j...
asked by 17.01.2018 / 12:00
2
answers

Implement function in child element

I have my template in a parent element and my child elements that extend the parent element class. import { Component } from '@angular/core'; @Component({ selector: 'ngx-cadastro', template: ' <div class="container btns-listagem">...
asked by 17.01.2018 / 11:51
1
answer

How to get the value coming from Response

I have a deadlock in getting a JSON of my return that I can not read it in any way I have already tried in several ways I will show below how the code is now and what I need to do. My Component method where it is returning what I want. on...
asked by 17.01.2018 / 18:04
1
answer

I can not use a module

I'm trying to use a module and I'm not getting this error below: Uncaught Error: Unexpected directive 'BordaCreateComponent' imported by the module 'AppModule'. Please add a @NgModule annotation. at syntaxError My App.module.ts import { B...
asked by 11.01.2018 / 04:04
1
answer

How to use base64 image in Angular 2?

I'm consuming the json service through Angular 2. And inside a ngFor with my let professor of professores , there's a line where I use this base64-type image: <div class="foto-card" style="background: url('{{ professor.imagem }}') cen...
asked by 06.12.2017 / 16:35
1
answer

Disable Validators.Required Angular2

I have the following form using Validators. this.formulario = new FormGroup({ CodigoTemp: new FormControl(null, [Validators.required]), }); I need to disable Validators.Required if a checkbox is checked. Is there any way to do this?...
asked by 14.12.2017 / 18:28
1
answer

How to organize my models in an Angular Cli project?

I would like to know if it is possible and also if it is a good practice to organize my models out of a component directory. For example: I would like to keep my models within a directory called "models" at the same level as the "app" directo...
asked by 26.01.2018 / 12:03
2
answers

Cast TypeScript (ERROR TypeError)

The problem is as follows, through a service ( ModeloService ), I get an array of Modelo , where Modelo is a class, I happen to be unable to access the methods of this class, since cast in the service is not being done...
asked by 12.01.2018 / 19:25
1
answer

Swap tabs ngb-tabset with button click

I have two tabs and need to change tabs by clicking a button. I usually work with routes, but in this case I need to change only the tab on the same webpage. I have the following Tabs, TAB 1 and TAB 2. Considering that I am in TAB 1, what wou...
asked by 24.11.2017 / 17:14