Skip to content

Instantly share code, notes, and snippets.

@RedFour
Last active December 1, 2016 16:34
Show Gist options
  • Save RedFour/2bb90e39d8ad6f13b4f21e05b94fc634 to your computer and use it in GitHub Desktop.
Save RedFour/2bb90e39d8ad6f13b4f21e05b94fc634 to your computer and use it in GitHub Desktop.
PrimeNG test project
<h1>
{{title}}
</h1>
<p-galleria [images]="images" panelWidth="500" panelHeight="313" showCaption="true"></p-galleria>
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css']
})
export class AppComponent implements OnInit{
title = 'app works!';
images: any[];
ngOnInit() {
this.images = [];
this.images.push({source:'http://i.imgur.com/Qo2DMBZ.jpg', alt:'Description for Image 1', title:'Title 1'});
this.images.push({source:'http://i.imgur.com/CgdK1Kl.jpg', alt:'Description for Image 2', title:'Title 2'});
this.images.push({source:'http://i.imgur.com/s7VUvvp.jpg', alt:'Description for Image 3', title:'Title 3'});
this.images.push({source:'http://i.imgur.com/ctWVY4w.jpg', alt:'Description for Image 4', title:'Title 4'});
}
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ApplicationRef } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { GalleriaModule } from 'primeng/primeng';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
CommonModule,
FormsModule,
GalleriaModule
],
providers: [],
entryComponents: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PrimengTest</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- PrimeNG dependencies -->
<link rel="stylesheet" type="text/css" href="node_modules/primeui/themes/omega/theme.css" />
<link rel="stylesheet" type="text/css" href="node_modules/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="node_modules/primeui/primeui-ng-all.min.css" />
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
{
"name": "primeng-test",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"core-js": "^2.4.0",
"font-awesome": "^4.6.3",
"primeng": "^1.0.0-beta.13",
"primeui": "^4.1.15",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.6",
"ts-helpers": "^1.1.1",
"zone.js": "0.6.12"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"@types/protractor": "^1.5.16",
"angular-cli": "1.0.0-beta.11-webpack.2",
"codelyzer": "0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-jasmine": "0.3.8",
"karma-remap-istanbul": "^0.2.1",
"protractor": "3.3.0",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "^2.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment