Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cff75c6

Browse filesBrowse files
Example of using PrimeNG
1 parent e87aa1f commit cff75c6
Copy full SHA for cff75c6

File tree

Expand file treeCollapse file tree

5 files changed

+17
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+17
-2
lines changed
Open diff view settings
Collapse file

‎templates/Angular2Spa/ClientApp/app/app.module.ts‎

Copy file name to clipboardExpand all lines: templates/Angular2Spa/ClientApp/app/app.module.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule } from '@angular/router';
3+
import { FormsModule } from '@angular/forms';
34
import { UniversalModule } from 'angular2-universal';
45
import { AppComponent } from './components/app/app.component'
56
import { NavMenuComponent } from './components/navmenu/navmenu.component';
67
import { HomeComponent } from './components/home/home.component';
78
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
89
import { CounterComponent } from './components/counter/counter.component';
10+
import { RatingModule } from 'primeng/primeng';
911

1012
@NgModule({
1113
bootstrap: [ AppComponent ],
@@ -24,7 +26,9 @@ import { CounterComponent } from './components/counter/counter.component';
2426
{ path: 'counter', component: CounterComponent },
2527
{ path: 'fetch-data', component: FetchDataComponent },
2628
{ path: '**', redirectTo: 'home' }
27-
])
29+
]),
30+
FormsModule,
31+
RatingModule
2832
]
2933
})
3034
export class AppModule {
Collapse file

‎templates/Angular2Spa/ClientApp/app/components/home/home.component.html‎

Copy file name to clipboardExpand all lines: templates/Angular2Spa/ClientApp/app/components/home/home.component.html
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ <h1>Hello, world!</h1>
1414
<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>
1515
<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>
1616
</ul>
17+
18+
<h1>PrimeNG example</h1>
19+
Rating: {{ ratingValue }}
20+
<p-rating [(ngModel)]="ratingValue"></p-rating>
Collapse file

‎templates/Angular2Spa/ClientApp/app/components/home/home.component.ts‎

Copy file name to clipboardExpand all lines: templates/Angular2Spa/ClientApp/app/components/home/home.component.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import { Component } from '@angular/core';
55
template: require('./home.component.html')
66
})
77
export class HomeComponent {
8+
public ratingValue: number;
89
}
Collapse file

‎templates/Angular2Spa/package.json‎

Copy file name to clipboardExpand all lines: templates/Angular2Spa/package.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
"aspnet-prerendering": "^1.0.6",
3737
"bootstrap": "^3.3.7",
3838
"es6-shim": "^0.35.1",
39+
"font-awesome": "^4.6.3",
3940
"isomorphic-fetch": "^2.2.1",
4041
"jquery": "^2.2.1",
4142
"preboot": "^4.5.2",
43+
"primeng": "^1.0.0-beta.16",
4244
"rxjs": "5.0.0-beta.12",
4345
"zone.js": "^0.6.21"
4446
}
Collapse file

‎templates/Angular2Spa/webpack.config.vendor.js‎

Copy file name to clipboardExpand all lines: templates/Angular2Spa/webpack.config.vendor.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
},
1111
module: {
1212
loaders: [
13-
{ test: /\.(png|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' },
13+
{ test: /\.(png|gif|woff|woff2|eot|ttf|svg)(\?|$)/, loader: 'url-loader?limit=100000' },
1414
{ test: /\.css(\?|$)/, loader: extractCSS.extract(['css']) }
1515
]
1616
},
@@ -30,7 +30,11 @@ module.exports = {
3030
'bootstrap/dist/css/bootstrap.css',
3131
'es6-shim',
3232
'es6-promise',
33+
'font-awesome/css/font-awesome.css',
3334
'jquery',
35+
'primeng/primeng',
36+
'primeng/resources/themes/omega/theme.css',
37+
'primeng/resources/primeng.min.css',
3438
'zone.js',
3539
]
3640
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.