# Is it possible to add an angular 2 component to an ionic project?

**URL:** <https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816>\
**Category:** ionic-v3\
**Created:** [September 9, 2017, 11:37pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816 "2017-09-09T23:37:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zuest](https://avatars.discourse-cdn.com/v4/letter/z/b9bd4f/32.png) [@zuest](https://forum.ionicframework.com/u/zuest)\
**Post date:** [September 9, 2017, 11:37pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/1 "2017-09-09T23:37:32Z")

</div>

my question is pretty basic im still new to ionic and was wondering how to do such thing, i want to add this angular phone validation component to my ionic 3 project

this is the component that i want to use

> **[webcat12345/ngx-intl-tel-input](https://github.com/webcat12345/ngx-intl-tel-input)**
>
> ngx-intl-tel-input - Phone number input field to support international numbers, Angular

anyone know how to do such thing?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [September 10, 2017, 4:13am UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/2 "2017-09-10T04:13:46Z")

</div>

The readme seems to have some pretty straightforward instructions. Have you tried following them?

---

<div class="post-metadata">

**Author:** ![zuest](https://avatars.discourse-cdn.com/v4/letter/z/b9bd4f/32.png) [@zuest](https://forum.ionicframework.com/u/zuest)\
**Post date:** [September 10, 2017, 10:10am UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/3 "2017-09-10T10:10:57Z")

</div>

yeah i did but i could not find this file (angular-cli.json) in my project to add the style sheets

```auto
Consuming library

Injecting StyleSheet

Inside angular-cli.json

 "styles": [
       
        "../node_modules/ngx-intl-tel-input/resource/intl-tel-input.css"
      ],

```

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [September 10, 2017, 6:30pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/4 "2017-09-10T18:30:52Z")

</div>

You should be able to import that in `app.scss`.

---

<div class="post-metadata">

**Author:** ![zuest](https://avatars.discourse-cdn.com/v4/letter/z/b9bd4f/32.png) [@zuest](https://forum.ionicframework.com/u/zuest)\
**Post date:** [September 10, 2017, 7:37pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/5 "2017-09-10T19:37:08Z")

</div>

so this is what i did in my login.html

```auto
 <ngx-intl-tel-input [(value)]="phone_number"></ngx-intl-tel-input>

```

and in my login.ts

```auto
export class login {
  public phone_number:number;
  public loginForm:FormGroup;
  public loading:Loading;
.
.
.
.etc.

```

i got this error after adding app.scss

```auto
(index):45 GET http://localhost:8100/node_modules/ngx-intl-tel-input/resource/intl-tel-input.css 
polyfills.js:3 Unhandled Promise rejection: Template parse errors:
Can't bind to 'value' since it isn't a known property of 'ngx-intl-tel-input'.
1. If 'ngx-intl-tel-input' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

  <ngx-intl-tel-input [ERROR ->][(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:22
'ngx-intl-tel-input' is not a known element:
1. If 'ngx-intl-tel-input' is an Angular component, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("

  [ERROR ->]<ngx-intl-tel-input [(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:2 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
Can't bind to 'value' since it isn't a known property of 'ngx-intl-tel-input'.
1. If 'ngx-intl-tel-input' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

  <ngx-intl-tel-input [ERROR ->][(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:22
'ngx-intl-tel-input' is not a known element:
1. If 'ngx-intl-tel-input' is an Angular component, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("

  [ERROR ->]<ngx-intl-tel-input [(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:2
    at syntaxError (http://localhost:8100/build/vendor.js:92676:34)
    at TemplateParser.parse (http://localhost:8100/build/vendor.js:103167:19)
    at JitCompiler._compileTemplate (http://localhost:8100/build/vendor.js:116918:39)
    at http://localhost:8100/build/vendor.js:116842:62
    at Set.forEach (native)
    at JitCompiler._compileComponents (http://localhost:8100/build/vendor.js:116842:19)
    at createResult (http://localhost:8100/build/vendor.js:116727:19)
    at t.invoke (http://localhost:8100/build/polyfills.js:3:9283)
    at r.run (http://localhost:8100/build/polyfills.js:3:4452)
    at http://localhost:8100/build/polyfills.js:3:14076 Error: Template parse errors:
Can't bind to 'value' since it isn't a known property of 'ngx-intl-tel-input'.
1. If 'ngx-intl-tel-input' is an Angular component and it has 'value' input, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

  <ngx-intl-tel-input [ERROR ->][(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:22
'ngx-intl-tel-input' is not a known element:
1. If 'ngx-intl-tel-input' is an Angular component, then verify that it is part of this module.
2. If 'ngx-intl-tel-input' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("

  [ERROR ->]<ngx-intl-tel-input [(value)]="phone_number"></ngx-intl-tel-input>

</ion-content>
"): ng:///AppModule/login.html@56:2
    at syntaxError (http://localhost:8100/build/vendor.js:92676:34)
    at TemplateParser.parse (http://localhost:8100/build/vendor.js:103167:19)
    at JitCompiler._compileTemplate (http://localhost:8100/build/vendor.js:116918:39)
    at http://localhost:8100/build/vendor.js:116842:62
    at Set.forEach (native)
    at JitCompiler._compileComponents (http://localhost:8100/build/vendor.js:116842:19)
    at createResult (http://localhost:8100/build/vendor.js:116727:19)
    at t.invoke (http://localhost:8100/build/polyfills.js:3:9283)
    at r.run (http://localhost:8100/build/polyfills.js:3:4452)
    at http://localhost:8100/build/polyfills.js:3:14076

```

any suggestion for this error?

---

<div class="post-metadata">

**Author:** ![zuest](https://avatars.discourse-cdn.com/v4/letter/z/b9bd4f/32.png) [@zuest](https://forum.ionicframework.com/u/zuest)\
**Post date:** [September 10, 2017, 8:04pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/6 "2017-09-10T20:04:34Z")

</div>

> [@zuest](#):
>
> @NgModule.schemas

i also tried this soultion but didnt work

> **[Angular2: Template parse errors: Add “CUSTOM\_ELEMENTS\_SCHEMA” to the...](https://hassantariqblog.wordpress.com/2016/10/12/angular2-template-parse-errors-add-custom_elements_schema-to-the-ngmodule-schemas/)**
>
> With the new angular 2.0.0 final release (sept 14, 2016), if you use custom html tags then it will report that Template parse errors. A custom tag is a tag you use in your HTML that’s not one…

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [September 10, 2017, 11:27pm UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/7 "2017-09-10T23:27:55Z")

</div>

> [@zuest](#):
>
> any suggestion for this error?

Double-check that you did all the `AppModule` stuff.

---

<div class="post-metadata">

**Author:** ![zuest](https://avatars.discourse-cdn.com/v4/letter/z/b9bd4f/32.png) [@zuest](https://forum.ionicframework.com/u/zuest)\
**Post date:** [September 11, 2017, 7:22am UTC](https://forum.ionicframework.com/t/is-it-possible-to-add-an-angular-2-component-to-an-ionic-project/104816/8 "2017-09-11T07:22:54Z")

</div>

yeah seems i had an error there thanks!

but i think theres still a problem with the style sheets

in app.scss i have imported the style sheet but i still get an error:

```auto
// http://ionicframework.com/docs/theming/

@import "../../node_modules/ngx-intl-tel-input/resource/intl-tel-input.css";

// App Global Sass
// --------------------------------------------------
// Put style rules here that you want to apply globally. These
// styles are for the entire app and not just one component.
// Additionally, this file can be also used as an entry point
// to import other Sass files to be included in the output CSS.
//
// Shared Sass variables, which can be used to adjust Ionic's
// default Sass variables, belong in "theme/variables.scss".
//
// To declare rules for a specific mode, create a child rule
// for the .md, .ios, or .wp mode classes. The mode class is
// automatically applied to the <body> element in the app.

```

![Screenshot_2](https://global.discourse-cdn.com/ionicframework/original/3X/a/8/a85a720caf6fd1bc4f053b7d9a8af0111484a978.png)

error im getting:

 ![Screenshot_3](https://global.discourse-cdn.com/ionicframework/original/3X/6/4/64465e46769b41ef925202a4077be99a364a2d6b.png)
