-buildpath: \
osgi.enroute.google.angular.compiler,\
osgi.enroute.google.angular.library,\
ossg.enroute.google.angular.webresource,\
library-scripts
typescript
import { Component } from '@angular/core';
@Component({
selector: 'hello',
template: '<h1>Hello World!</h1>'
})
export class HelloComponent { }
typescript
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello.component';
@NgModule({
imports: [BrowserModule],
declarations: [AppComponent, HelloComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
html
<hello></hello>
typescript
import { Component } from '@angular/core';
@Component({
selector: 'hello',
templateUrl: './hello.component.html'
})
export class HelloComponent { }
html
<h1>Hello World!</h1>
typescript
import { Component } from '@angular/core';
@Component({
selector: 'hello',
templateUrl: './hello.component.html',
styleUrls: ['./hello.component.css']
})
export class HelloComponent { }
css
h1 {
color: red;
}