Toggle navigation
P3X GitList Snapshot
GitHub
Repo
Changelog
To do
Releases
Themes
Change log
Loading change log ...
To do ...
Loading todo ...
browsing:
182cebab27373ba6bea52b7151b2a6f824cad32f
Branches
master
Tags
1.1.129-287
1.1.113-149
1.1.108-143
1.1.95-138
1.1.92-119
1.0.35-18
1.0.13-14
Files
Commits
Log
Graph
Stats
angular-compile.git
test
angular2
app
Page.ts
RSS
Git
Fetch origin
Download
ZIP
TAR
Clone
Raw
View
History
Clone
SSH
HTTPS
Blames found: 3
Mode: application/typescript
Binary: false
Hang on, we reloading big blames...
16533ae5
import { Component, Injectable, ViewChild, ViewContainerRef, AfterViewInit } from '@angular/core'; import { CompileHtmlService } from '../../../src/CompileHtmlService'; @Component({ selector: 'p3x-ng2-compile-html',
182cebab
template: `<div #container></div>`,
16533ae5
}) @Injectable() export class Page implements AfterViewInit{ @ViewChild('container', {read: ViewContainerRef}) container: ViewContainerRef; constructor( private compileHtmlService: CompileHtmlService ) {} alert(string: string ) { alert(string); } ngAfterViewInit() { this.compileHtmlService.compile({ template: `<a href="javascript:void(0);" (click)="ref.alert('ok')">If click works it says OK!</a>`, container: this.container, ref: this, }) } }