Example of using PrimeNG

This commit is contained in:
SteveSandersonMS
2016-09-28 11:30:34 +01:00
parent e87aa1f088
commit cff75c6893
5 changed files with 17 additions and 2 deletions

View File

@@ -1,11 +1,13 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { UniversalModule } from 'angular2-universal';
import { AppComponent } from './components/app/app.component'
import { NavMenuComponent } from './components/navmenu/navmenu.component';
import { HomeComponent } from './components/home/home.component';
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
import { CounterComponent } from './components/counter/counter.component';
import { RatingModule } from 'primeng/primeng';
@NgModule({
bootstrap: [ AppComponent ],
@@ -24,7 +26,9 @@ import { CounterComponent } from './components/counter/counter.component';
{ path: 'counter', component: CounterComponent },
{ path: 'fetch-data', component: FetchDataComponent },
{ path: '**', redirectTo: 'home' }
])
]),
FormsModule,
RatingModule
]
})
export class AppModule {

View File

@@ -14,3 +14,7 @@
<li><strong>Hot module replacement</strong>. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, your Angular 2 app will be rebuilt and a new instance injected is into the page.</li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are disabled, and the <code>webpack</code> build tool produces minified static CSS and JavaScript files.</li>
</ul>
<h1>PrimeNG example</h1>
Rating: {{ ratingValue }}
<p-rating [(ngModel)]="ratingValue"></p-rating>

View File

@@ -5,4 +5,5 @@ import { Component } from '@angular/core';
template: require('./home.component.html')
})
export class HomeComponent {
public ratingValue: number;
}