All Questions

107
votes
9answers
76148 views

How can I use/create dynamic template to compile dynamic Component with Angular 2.0?

I want to dynamically create template. This should be used to build a ComponentType at Runtime and place (even replace) it somewhere inside of the hosting Component. Until RC4 I was using ComponentR...
89
votes
8answers
40349 views

Equivalent of $compile in Angular 2

I want to manually compile some HTML containing directives. What is the equivalent of $compile in Angular 2? For example, in Angular 1, I could dynamically compile a fragment of HTML and append it t...
29
votes
3answers
28640 views

Dynamically load HTML template in angular2

I have created a project using angular-cli which contains AppComponent as follows: import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html...
2
votes
1answers
876 views

recursive dynamic template compilation in angular2

I've based some of my work on the same problem described in here: dynamic template to compile dynamic Component with Angular 2.0 How can I use/create dynamic template to compile dynamic Component wi...
3
votes
2answers
194 views

Add custom elements and attributes to compiler schema

There are some custom elements and attributes in component template (in this example they are used by third-party non-Angular code): <foo></foo> <div data-bar="{{ bar }}"></div&g...
4
votes
1answers
1942 views

"Can't read the url" error for angular2 dynamic components with templateUrl

Tried to modify soultion from here. It works fine, but if you change template to templateUrl in component, that should load dynamically, you get an error: "No ResourceLoader implementation has been pr...
5
votes
0answers
1189 views

Angular2 RC5 dynamically compile component with correct module

I'm trying to use the angular2 compiler to dynamically insert a component, which works fine as long as all code is in the default module. But if try to put the component into it's own feature module,...
5
votes
2answers
2674 views

How to use RouterModule.forRoot() in Angular2 compiler/cli ngc command

Let's say i have the following appRoutingModule: export const routes: Route[] = [ { path: '', component: ApplicationlistComponent } ]; @NgModule( { imports: [ ApplicationsModule, Route...

Previous Next