title: How to edit a NPM package for customized requirement in Angular
body: <p>For angular I installed <a href="https://www.npmjs.com/package/ng4-intl-phone" rel="nofollow noreferrer">https://www.npmjs.com/package/ng4-intl-phone</a> for Angular6 but it is not providing Placeholder option under the hood. So I decided to edit javascript installed in package. So I did following:</p>
  
  <p>node_modules/ng4-intl-phone/bundles/ng4-intl-phone.umd.js</p>
  
  <pre><code>IntPhonePrefixComponent.decorators = [{
              type: _angular_core.Component,
              args: [{
                  selector: 'int-phone-prefix',
                  template: "&lt;div class=\"input-group\"&gt; &lt;span class=\"input-group-addon flagInput\"&gt; &lt;div class=\"dropdown\"&gt; &lt;button type=\"button\" class=\"dropbtn btn\" (click)=\"showDropDown()\" [disabled]=\"disabled\"&gt; &lt;span [class]=\"'flag flag-' + selectedCountry.countryCode\" *ngIf=\"selectedCountry\"&gt;&lt;/span&gt; &lt;span class=\"defaultCountry\" *ngIf=\"!selectedCountry\"&gt;&lt;/span&gt; &lt;/button&gt; &lt;div class=\"dropdown-content\" *ngIf=\"showDropdown\" clickOutside&gt; &lt;div class=\"list-group scrollable-menu\"&gt; &lt;a href=\"#\" class=\"list-group-item\" *ngFor=\"let country of countries | country: countryFilter\" (click)=\"updateSelectedCountry($event, country.countryCode)\"&gt; &lt;span [class]=\"'flag flag-' + country.countryCode\"&gt;&lt;/span&gt; &lt;span class=\"country-name\"&gt;{{ country.name }}  &lt;span class=\"dial-code\"&gt;+ {{ country.dialCode}}&lt;/span&gt;&lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/span&gt; &lt;input [onlyNumber]=\"onlyNumbers\" placeholder=\"Mobile as Username\" class=\"form-control\" [maxlength]=\"maxLength\" [disabled]=\"disabled\" [(ngModel)]=\"phoneInput\" (ngModelChange)=\"updatePhone()\"&gt; &lt;/div&gt; ",
                  styles: [".country-name { margin-left: 6px; } .dial-code { color: #999; } .scrollable-menu { height: auto; max-height: 200px; width: 350px; overflow-x: hidden; } .flagInput { padding: 0 !important; } .input-group-addon { text-align: left; } .btn-flag { border-color: white; } .btn:hover, .btn:focus{ background-color: white; } .defaultCountry { background:url('http://res.cloudinary.com/dvbuhh0bl/image/upload/c_scale,h_15,w_15/v1495279723/default_tmey2r.png') no-repeat; display:inline-block; width:15px; height:15px; } .list-group { margin-bottom: 0; } /* Dropdown Button */ .dropbtn { background-color: white; color: white; border: none; cursor: pointer; } .dropdown { position: relative; display: inline-block; } .dropdown-content { position: absolute; background-color: #f9f9f9; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1000; } .dropdown-content a { color: black; padding: 12px 16px; text-decoration: none; display: block; } ",
                      "/*! * Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/) */.flag{display:inline-block;width:16px;height:11px;background:url('http://res.cloudinary.com/dvbuhh0bl/image/upload/v1495279723/flags_boi3c5.png') no-repeat}.flag.flag-af{background-position:-32px 0}.flag.flag-ky{background-position:-128px -77px}.flag.flag-in{background-position:-64px -66px}.flag.flag-mm{background-position:-192px -88px}.flag.flag-td{background-position:-240px -132px}.flag.flag-dm{background-position:-80px -33px}.flag.flag-se{background-position:-208px -121px}.flag.flag-pr{background-position:-224px -110px}.flag.flag-bj{background-position:-112px -11px}.flag.flag-gr{background-position:-48px -55px}.flag.flag-um{background-position:-256px -143px}.flag.flag-ps{background-position:-240px -110px}.flag.flag-fi{background-position:0 -44px}.flag.flag-kr{background-position:-80px -77px}.flag.flag-nl{background-position:-240px -99px}.flag.flag-bo{background-position:-160px -11px}.flag.flag-bf{background-position:-48px -11px}.flag.flag-ba{background-position:-256px 0}.flag.flag-ax{background-position:-224px 0}.flag.flag-pf{background-position:-112px -110px}.flag.flag-eg{background-position:-160px -33px}.flag.flag-sb{background-position:-144px -121px}.flag.flag-dk{background-position:-64px -33px}.flag.flag-ci{background-position:-112px -22px}.flag.flag-ic{background-position:-240px -55px}.flag.flag-cl{background-position:-144px -22px}.flag.flag-zw{background-position:-32px -165px}.flag.flag-my{background-position:-112px -99px}.flag.flag-li{background-position:-208px -77px}.flag.flag-mc{background-position:-80px -88px}.flag.flag-fo{background-position:-64px -44px}.flag.flag-vu{background-position:-144px -154px}.flag.flag-al{background-position:-80px 0}.flag.flag-ge{background-position:-144px -44px}.flag.flag-somaliland{background-position:-96px -132px}.flag.flag-am{background-position:-96px 0}.flag.flag-tf{background-position:-256px -132px}.flag.flag-ni{background-position:-224px -99px}.flag.flag-tn{background-position:-112px -143px}.flag.flag-lv{background-position:-32px -88px}.flag.flag-vi{background-position:-112px -154px}.flag.flag-ve{background-position:-80px -154px}.flag.flag-gm{background-position:-256px -44px}.flag.flag-fm{background-position:-48px -44px}.flag.flag-mg{background-position:-128px -88px}.flag.flag-mh{background-position:-144px -88px}.flag.flag-tc{background-position:-224px -132px}.flag.flag-id{background-position:-256px -55px}.flag.flag-tw{background-position:-192px -143px}.flag.flag-so{background-position:-80px -132px}.flag.flag-pg{background-position:-128px -110px}.flag.flag-hk{background-position:-144px -55px}.flag.flag-mt{background-position:-32px -99px}.flag.flag-do{background-position:-96px -33px}.flag.flag-gg{background-position:-192px -44px}.flag.flag-nr{background-position:-16px -110px}.flag.flag-mp{background-position:-240px -88px}.flag.flag-mw{background-position:-80px -99px}.flag.flag-bb{background-position:0 -11px}.flag.flag-hu{background-position:-224px -55px}.flag.flag-xk{background-position:-208px -154px}.flag.flag-za{background-position:-256px -154px}.flag.flag-zanzibar{background-position:0 -165px}.flag.flag-sy{background-position:-192px -132px}.flag.flag-bi{background-position:-96px -11px}.flag.flag-qa{background-position:-32px -121px}.flag.flag-kurdistan{background-position:-96px -77px}.flag.flag-scotland{background-position:-176px -121px}.flag.flag-gf{background-position:-160px -44px}.flag.flag-tk{background-position:-64px -143px}.flag.flag-me{background-position:-112px -88px}.flag.flag-om{background-position:-64px -110px}.flag.flag-tv{background-position:-176px -143px}.flag.flag-at{background-position:-176px 0}.flag.flag-by{background-position:-256px -11px}.flag.flag-wf{background-position:-176px -154px}.flag.flag-ph{background-position:-144px -110px}.flag.flag-ke{background-position:-240px -66px}.flag.flag-ng{background-position:-208px -99px}.flag.flag-eh{background-position:-176px -33px}.flag.flag-yt{background-position:-240px -154px}.flag.flag-cg{background-position:-80px -22px}.flag.flag-br{background-position:-176px -11px}.flag.flag-ma{background-position:-64px -88px}.flag.flag-bm{background-position:-128px -11px}.flag.flag-gi{background-position:-224px -44px}.flag.flag-mn{background-position:-208px -88px}.flag.flag-eu{background-position:-256px -33px}.flag.flag-us{background-position:0 -154px}.flag.flag-uy{background-position:-16px -154px}.flag.flag-hn{background-position:-176px -55px}.flag.flag-gp{background-position:-16px -55px}.flag.flag-km{background-position:-32px -77px}.flag.flag-au{background-position:-192px 0}.flag.flag-tz{background-position:-208px -143px}.flag.flag-pt{background-position:-256px -110px}.flag.flag-je{background-position:-176px -66px}.flag.flag-md{background-position:-96px -88px}.flag.flag-pl{background-position:-176px -110px}.flag.flag-cr{background-position:-208px -22px}.flag.flag-sk{background-position:-16px -132px}.flag.flag-kg{background-position:-256px -66px}.flag.flag-nu{background-position:-32px -110px}.flag.flag-lr{background-position:-240px -77px}.flag.flag-ht{background-position:-208px -55px}.flag.flag-rw{background-position:-112px -121px}.flag.flag-sg{background-position:-224px -121px}.flag.flag-ag{background-position:-48px 0}.flag.flag-mx{background-position:-96px -99px}.flag.flag-ch{background-position:-96px -22px}.flag.flag-sz{background-position:-208px -132px}.flag.flag-dj{background-position:-48px -33px}.flag.flag-kn{background-position:-48px -77px}.flag.flag-england{background-position:-192px -33px}.flag.flag-ro{background-position:-64px -121px}.flag.flag-ca{background-position:-16px -22px}.flag.flag-tr{background-position:-144px -143px}.flag.flag-pa{background-position:-80px -110px}.flag.flag-ye{background-position:-224px -154px}.flag.flag-si{background-position:-256px -121px}.flag.flag-tt{background-position:-160px -143px}.flag.flag-ml{background-position:-176px -88px}.flag.flag-sl{background-position:-32px -132px}.flag.flag-sa{background-position:-128px -121px}.flag.flag-py{background-position:-16px -121px}.flag.flag-ad{background-position:0 0}.flag.flag-gy{background-position:-128px -55px}.flag.flag-ls{background-position:-256px -77px}.flag.flag-sj{background-position:0 -132px}.flag.flag-fk{background-position:-32px -44px}.flag.flag-kw{background-position:-112px -77px}.flag.flag-sm{background-position:-48px -132px}.flag.flag-vn{background-position:-128px -154px}.flag.flag-iq{background-position:-96px -66px}.flag.flag-ie{background-position:0 -66px}.flag.flag-mz{background-position:-128px -99px}.flag.flag-vg{background-position:-96px -154px}.flag.flag-ms{background-position:-16px -99px}.flag.flag-cw{background-position:-256px -22px}.flag.flag-bt{background-position:-208px -11px}.flag.flag-gn{background-position:0 -55px}.flag.flag-uz{background-position:-32px -154px}.flag.flag-cv{background-position:-240px -22px}.flag.flag-pw{background-position:0 -121px}.flag.flag-bv{background-position:-224px -11px}.flag.flag-lb{background-position:-176px -77px}.flag.flag-sn{background-position:-64px -132px}.flag.flag-la{background-position:-160px -77px}.flag.flag-pe{background-position:-96px -110px}.flag.flag-sx{background-position:-176px -132px}.flag.flag-fr{background-position:-80px -44px}.flag.flag-catalonia{background-position:-32px -22px}.flag.flag-kh{background-position:0 -77px}.flag.flag-jp{background-position:-224px -66px}.flag.flag-vc{background-position:-64px -154px}.flag.flag-hm{background-position:-160px -55px}.flag.flag-tl{background-position:-80px -143px}.flag.flag-no{background-position:-256px -99px}.flag.flag-ee{background-position:-144px -33px}.flag.flag-cz{background-position:-16px -33px}.flag.flag-gw{background-position:-112px -55px}.flag.flag-ai{background-position:-64px 0}.flag.flag-ar{background-position:-144px 0}.flag.flag-co{background-position:-192px -22px}.flag.flag-na{background-position:-144px -99px}.flag.flag-er{background-position:-208px -33px}.flag.flag-pm{background-position:-192px -110px}.flag.flag-bg{background-position:-64px -11px}.flag.flag-sr{background-position:-112px -132px}.flag.flag-cm{background-position:-160px -22px}.flag.flag-il{background-position:-16px -66px}.flag.flag-tibet{background-position:-32px -143px}.flag.flag-lk{background-position:-224px -77px}.flag.flag-et{background-position:-240px -33px}.flag.flag-rs{background-position:-80px -121px}.flag.flag-th{background-position:-16px -143px}.flag.flag-tm{background-position:-96px -143px}.flag.flag-fj{background-position:-16px -44px}.flag.flag-ki{background-position:-16px -77px}.flag.flag-re{background-position:-48px -121px}.flag.flag-nf{background-position:-192px -99px}.flag.flag-kz{background-position:-144px -77px}.flag.flag-nc{background-position:-160px -99px}.flag.flag-bn{background-position:-144px -11px}.flag.flag-gb{background-position:-112px -44px}.flag.flag-mq{background-position:-256px -88px}.flag.flag-sc{background-position:-160px -121px}.flag.flag-gu{background-position:-96px -55px}.flag.flag-io{background-position:-80px -66px}.flag.flag-cd{background-position:-48px -22px}.flag.flag-tg{background-position:0 -143px}.flag.flag-sv{background-position:-160px -132px}.flag.flag-jo{background-position:-208px -66px}.flag.flag-ua{background-position:-224px -143px}.flag.flag-ga{background-position:-96px -44px}.flag.flag-cu{background-position:-224px -22px}.flag.flag-va{background-position:-48px -154px}.flag.flag-mu{background-position:-48px -99px}.flag.flag-hr{background-position:-192px -55px}.flag.flag-to{background-position:-128px -143px}.flag.flag-bh{background-position:-80px -11px}.flag.flag-ec{background-position:-128px -33px}.flag.flag-ug{background-position:-240px -143px}.flag.flag-de{background-position:-32px -33px}.flag.flag-gq{background-position:-32px -55px}.flag.flag-bd{background-position:-16px -11px}.flag.flag-bs{background-position:-192px -11px}.flag.flag-ck{background-position:-128px -22px}.flag.flag-gd{background-position:-128px -44px}.flag.flag-sh{background-position:-240px -121px}.flag.flag-be{background-position:-32px -11px}.flag.flag-mr{background-position:0 -99px}.flag.flag-tj{background-position:-48px -143px}.flag.flag-gl{background-position:-240px -44px}.flag.flag-as{background-position:-160px 0}.flag.flag-es{background-position:-224px -33px}.flag.flag-zm{background-position:-16px -165px}.flag.flag-wales{background-position:-160px -154px}.flag.flag-np{background-position:0 -110px}.flag.flag-lu{background-position:-16px -88px}.flag.flag-st{background-position:-144px -132px}.flag.flag-ao{background-position:-128px 0}.flag.flag-cf{background-position:-64px -22px}.flag.flag-az{background-position:-240px 0}.flag.flag-bw{background-position:-240px -11px}.flag.flag-nz{background-position:-48px -110px}.flag.flag-cy{background-position:0 -33px}.flag.flag-ne{background-position:-176px -99px}.flag.flag-kp{background-position:-64px -77px}.flag.flag-gs{background-position:-64px -55px}.flag.flag-mk{background-position:-160px -88px}.flag.flag-mo{background-position:-224px -88px}.flag.flag-jm{background-position:-192px -66px}.flag.flag-ws{background-position:-192px -154px}.flag.flag-lc{background-position:-192px -77px}.flag.flag-an{background-position:-112px 0}.flag.flag-gh{background-position:-208px -44px}.flag.flag-im{background-position:-48px -66px}.flag.flag-is{background-position:-128px -66px}.flag.flag-ae{background-position:-16px 0}.flag.flag-it{background-position:-144px -66px}.flag.flag-ss{background-position:-128px -132px}.flag.flag-ly{background-position:-48px -88px}.flag.flag-mv{background-position:-64px -99px}.flag.flag-ir{background-position:-112px -66px}.flag.flag-gt{background-position:-80px -55px}.flag.flag-bz{background-position:0 -22px}.flag.flag-dz{background-position:-112px -33px}.flag.flag-lt{background-position:0 -88px}.flag.flag-sd{background-position:-192px -121px}.flag.flag-pk{background-position:-160px -110px}.flag.flag-ru{background-position:-96px -121px}.flag.flag-pn{background-position:-208px -110px}.flag.flag-cn{background-position:-176px -22px}.flag.flag-aw{background-position:-208px 0} "
                  ],
                  host: {
                      '(document:click)': 'hideDropdown($event)',
                  },
                  providers: [COUNTER_CONTROL_ACCESSOR, CountryService, LocaleService]
              }, ]
      }, ];
  </code></pre>
  
  <p>I edited input element with placeholder and build angular again. But the changes are not reflecting. Is there another reason to to so. </p>
  
  <p>One more thing for efficiency, I would like placeholder to be paramenterized.</p>