New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ibge/calendario

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibge/calendario

## Instalação

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Calendário

Instalação

Para instalar a biblioteca, rode:

$ npm install @ibge/calendario --save

Usando a biblioteca

Após instalar a biblioteca, você deve importar o CalendarioModule no seu AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

// Módulo do Calendário
import { CalendarioModule } from '@ibge/calendario';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    
    // Adicionar o CalendarioModule no AppModule, caso seja em um módulo interno basta importar como CalendarioModule
    CalendarioModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Uma vez importado, é possível consumir os serviços do calendário, recebendo a informação segundo a api de calendário http://servicodados.ibge.gov.br/api/docs/calendario

// Importar o serviço e interfaces, se necessário
import { CalendarioService, Divulgacao, DivulgacoesPaginadas } from '@ibge/calendario';

// ...

  constructor(
    // Injetar o serviço no construtor do componente
    private _calendarioServ: CalendarioService
  ) {}

  ngOnInit(): void {
    // Chamar os métodos disponíveis
    this._calendarioServ.getDivulgacoes({
      qtd: 10,
      de: '2017-05-01',
      ate: '2017-06-08'
    }).subscribe((divulgacoesPaginadas: DivulgacoesPaginadas) => {
      // Utilizar as divulgacoesPaginadas aqui
    })
  }

Desenvolvimento

Esse componente utilizou o generator do yeoman https://github.com/jvandemo/generator-angular2-library, os comandos utilizados podem ser encontrados na documentação

Licença

MIT

Keywords

FAQs

Package last updated on 08 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc