Toggle navigation
P3X GitList Snapshot
GitHub
Repo
Changelog
To do
Releases
Themes
Change log
Loading change log ...
To do ...
Loading todo ...
browsing:
92a787ef61fe50df5496923450dcbf08f420fbc7
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
README.md
RSS
Git
Fetch origin
Download
ZIP
TAR
Clone
Raw
View
History
Clone
SSH
HTTPS
Blames found: 27
Mode: markdown
Binary: false
Hang on, we reloading big blames...
4395ce28
# ng2-compile-html
c6f22a88
[![Build Status](https://travis-ci.org/patrikx3/ng2-compile-html.svg?branch=master)](https://travis-ci.org/patrikx3/ng2-compile-html)
fe5ef982
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/patrikx3/ng2-compile-html/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/patrikx3/ng2-compile-html/?branch=master)
814ae94c
[![Code Coverage](https://scrutinizer-ci.com/g/patrikx3/ng2-compile-html/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/patrikx3/ng2-compile-html/?branch=master)
92a787ef
[![Trello](https://img.shields.io/badge/Trello-p3x-026aa7.svg)](https://trello.com/b/gqKHzZGy/p3x)
860a1b03
26221cf7
Angular 2 Service/Attribute to compile an HTML into a component
c6f22a88
It is only using ```TypeScript``` right now. It can be built though.
860a1b03
a2110330
##Install
4be1332c
c6f22a88
```bash
4b1761c2
npm install p3x-ng2-compile-html
c6f22a88
```
6c890dd6
##Test ```bash git clone https://github.com/patrikx3/ng2-compile-html.git cd ng2-compile-html npm install grunt run ``` [http://localhost:8080](http://localhost:8080)
c6f22a88
##Usage
3f5778d5
4be1332c
###HTML
7a8f2e42
503f2b36
```html
88c62b72
<div #container></div>
814ae94c
<div [p3x-compile-html]="data2" [p3x-compile-html-ref]="ref" [p3x-compile-html-imports]="importsLikeMaterialEtc"></div>
1fab801c
```
4be1332c
###TypeScript
e97b3fae
Check out the example, here [test/angular2/app/Page.ts](test/angular2-webpack/app/Page.ts). ###Infi Angular 2 tries to camelCase all attributes, for me it is still HTML, so my selectors always ```kebab-case```.
503f2b36
26221cf7
by [Patrik Laszlo](http://patrikx3.tk)