I start with Angular 2 (version 2.0.0-alpha.46) and create some components.
When creating a component with the code below:
Typescript:
import {ComponentMetadata as Component, ViewMetadata as View} from 'angular2/angular2'; @Component({ selector: 'my-component' }) @View({ template: '<div class="myClass">Hello My component</div>' }) export class MyCompoent{ constructor() { console.info('My Component Mounted Successfully'); } }
HTML:
<my-component></my-component>
It works fine, but when I do the Inspect element , I see a tag generated like this:
HTML output
<my-component> <div>Hello My component</div> <my-component>
problem
it saves <my-component> in HTML and some of my CSS are not working properly.
Question
Is there a way to remove <my-component> similar to angular 1 ( replace: true in the directive)?
javascript angular
powercoder23 Jan 04 '16 at 10:20 2016-01-04 10:20
source share