PrimeNg not working

UI Components for Angular
CC84
Posts: 69
Joined: 11 Mar 2016, 09:32

21 Mar 2016, 22:57

As expected, you don't have added the button to your components directives:

Try:
import {Component} from 'angular2/core';
import {Button} from 'primeng/primeng';
@Component({
selector: 'my-app',
directives: [Button],
template: `
<h1>My First App</h1>
<button pButton type="button" label="Click"></button>
`
})
export class AppComponent {

text: string;
}

microdeveloper
Posts: 82
Joined: 21 Mar 2016, 19:42

21 Mar 2016, 23:51

Please replay I am waiting for the answer.

Thanks.

microdeveloper
Posts: 82
Joined: 21 Mar 2016, 19:42

21 Mar 2016, 23:53

Perfect actually I just copy pasted from showcase samples and Directives is not included there but anyhow I am so happy now thanks.

CC84
Posts: 69
Joined: 11 Mar 2016, 09:32

22 Mar 2016, 00:20

Just again:
Read about angular2! The directives is nothing special about primeng, it's angular2 basics.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests