Toggle navigation
P3X GitList Snapshot
GitHub
Repo
Changelog
To do
Releases
Themes
Change log
Loading change log ...
To do ...
Loading todo ...
browsing:
29ad14ee702d3d5ba9b9fc303ab86c22725602ec
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
src
CompileAttribute.ts
RSS
Git
Fetch origin
Download
ZIP
TAR
Clone
Raw
View
History
Clone
SSH
HTTPS
Blames found: 7
Mode: application/typescript
Binary: false
Hang on, we reloading big blames...
f46e4d96
import { Directive, Input, Injectable, ViewContainerRef, OnInit, OnChanges, SimpleChanges, Type, ModuleWithProviders,
69db3407
NgModule,
f46e4d96
} from '@angular/core'; import { CompileService } from './CompileService'; @Directive({ selector: '[p3x-compile]' }) @Injectable() export class CompileAttribute implements OnInit, OnChanges{ @Input('p3x-compile') html: string; @Input('p3x-compile-ctx') context: any;
69db3407
@Input('p3x-compile-module') module: NgModule;
f46e4d96
@Input('p3x-compile-imports') imports: Array<Type<any> | ModuleWithProviders | any[]>; async update() { if (this.html === undefined || this.html.trim() === '') { this.container.clear(); return; } await this.service.compile({ template: this.html, container: this.container, context: this.context,
69db3407
imports: this.imports, module: this.module
f46e4d96
}) } ngOnInit() { this.update(); } ngOnChanges(changes: SimpleChanges) { //fixme only update with the required changes this.update(); } constructor( private container: ViewContainerRef, private service: CompileService ) {} }