npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng2-daum-address

v1.1.4

Published

Daum Address API for Angular2

Downloads

16

Readme

ng2-daum-address

앵귤러2를 위한 다음 주소 검색 API

NPM Version Downloads

설치

npm i --save ng2-daum-address

1.1.1버전 이상을 사용하기를 권합니다. 그 이하버전은 ng build시에 module을 가져오지 못하는 버그가 있습니다.

1.1.3버전 이상은 앵귤러2의 4버전을 이용하셔야합니다.

사용법

NgDaumAddressModuleapp.module.ts에 임포트:

import { NgDaumAddressModule } from 'ng2-daum-address';

@NgModule({
  ...
  imports: [
    ...
    NgDaumAddressModule,
  ],
})
export class AppModule { }

템플릿에서 btn-daum-address 컴포넌트를 아래처럼 추가:

<btn-daum-address (result)="setDaumAddressApi($event)" [options]="daumAddressOptions"></btn-daum-address>

가져온 컴포넌트.ts 에서 설정:

daumAddressOptions =  {
  class: ['btn', 'btn-primary']
};

setDaumAddressApi(data){
  // 여기로 주소값이 반환
  console.log(data);
}

popup형태가 아닐 경우 아래의 Element를 ParentComponent에 넣어야합니다.

layer

<!-- iOS에서는 position:fixed 버그가 있음, 적용하는 사이트에 맞게 position:absolute 등을 이용하여 top,left값 조정 필요 -->
<div id="layer" style="display:none;position:fixed;overflow:hidden;z-index:1;-webkit-overflow-scrolling:touch;">
<img src="//t1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnCloseLayer" style="cursor:pointer;position:absolute;right:-3px;top:-3px;z-index:1" alt="닫기 버튼">
</div>

inline

<div id="wrap" style="display:none;border:1px solid;width:500px;height:300px;margin:5px 0;position:relative">
<img src="//t1.daumcdn.net/localimg/localimages/07/postcode/320/close.png" id="btnFoldWrap" style="cursor:pointer;position:absolute;right:0px;top:-1px;z-index:1" alt="접기 버튼">
</div>

옵션

  • type?: String => layer|inline|popup (default popup)
  • target?: String => layer, inline 타입시 embed할 요소의 ID값 (위 소스에서 layer, wrap)
  • width?: Number => layer 타입시 가로크기
  • height?: Number => layer 타입시 세로크기
  • border?: Number => layer 타입시 테두리 크기
  • class?: Array|String => 클래스 부여
  • debug?: boolean => 디버깅 모드

자세한 예제는 여기서 확인 가능합니다.

License

MIT