Joffutt4
Joffutt4

Reputation: 1458

Include external component in angular 2

I have been attempting to include an external component through URL into a new Angular2 application, but I keep running into problems with the typescript not being able to compile and run the application.

Here is the import I am trying to do.

import { Component } from '@angular/core';
import { ListComponent } from 'enter.remote.url.here.com';

Is there any way to get an external component to be loaded into another Angular2 application?

Thanks

Upvotes: 0

Views: 989

Answers (1)

kit
kit

Reputation: 4920

you can load external component to angular2 app, however first you have to install it via npm. Also remember about typings. Without those typesript won't know what type/class/interface you want

Upvotes: 1

Related Questions