Primeng QuickStart errors

UI Components for Angular
Post Reply
Nerg
Posts: 6
Joined: 24 Feb 2016, 13:52

26 Feb 2016, 19:48

I try to execute the quickstart primeng but I have TS6053 errors.
Here is what I did:

git clone https://github.com/primefaces/primeng-quickstart.git
npm install
npm start

All those commands worked fine but when I go on localhost:3000 I then have a lot of error TS6053.
Does anybody else have the same errors ? Does the quckstart works for you ?

cagatay.civici
Prime
Posts: 18330
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Feb 2016, 09:04

Let me recheck quick start and get back to you. Alpha7 switched to typings so it might be the reason.

cagatay.civici
Prime
Posts: 18330
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Feb 2016, 00:58

Please try again, we've updated the quickstart.

Nerg
Posts: 6
Joined: 24 Feb 2016, 13:52

01 Mar 2016, 11:48

Great it works. But the app does nothing when typing, first I thought it was a bug but then I try with the line from your website instead and it display the text I type :

<input type="text" pInputText [(ngModel)]="text"/> &nbsp; {{text}}

What I would like to see working too is the slider component. I try to use it but I get an error. Here is the code I used in the app component:

Code: Select all

import {Component} from 'angular2/core';
import {Slider} from 'primeng/primeng';

@Component({
  selector: 'my-app',
  template: `
  <p-slider [(value)]="val"></p-slider>
  `,
  directives: [Slider]
})

export class AppComponent {
  val: number = 20;
}
And here is the error that I get:

Code: Select all

TypeError: jQuery(...).slider is not a function
    at Slider.ngAfterViewInit (http://localhost:3000/node_modules/primeng/components/slider/slider.js:29:63)
    at AbstractChangeDetector.ChangeDetector_AppComponent_0.afterViewLifecycleCallbacksInternal (viewFactory_AppComponent:74:82)
Did I miss an import ? The index.html seems to import the jquery stuff.

Code: Select all

    <script src="app/resources/jquery.js"></script>
    <script src="app/resources/jquery-ui.js"></script>
    <script src="app/resources/primeui.js"></script>
Do you have an idea ?

Sorry to bother. I know it still in development but I really want to use this slider component now :)

cagatay.civici
Prime
Posts: 18330
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Mar 2016, 13:01

You also need jQuery UI slider, here is a jQuery UI file that includes core apis and the slider. It is a slimmed down version, that doesn't have unused jQuery UI widgets. It includes core+datepicker+slider, that PrimeNG utilizes.

https://raw.githubusercontent.com/prime ... uery-ui.js

Please replace your jquery-ui.js with this one.

Alternatively you can get a custom build from jquery-ui website.

Nerg
Posts: 6
Joined: 24 Feb 2016, 13:52

01 Mar 2016, 15:53

Great it works ! I forgot the slider was not part of the default jquery-ui :x

Thanks !

cagatay.civici
Prime
Posts: 18330
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Mar 2016, 18:53

Glad to hear!

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests