layout js is not working when included in another project

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
zakhussain
Posts: 4
Joined: 07 Nov 2016, 06:07

15 Nov 2016, 06:04

I was trying to move the css, html and js to angular 2 seed project, so that I can start working on my project. I was able to get the css and html to work fine. In order for the menu to work, I included the layout.js file along with jquery.deps.js file in the index.html. I see that it is being included, however when I click on the menu in the top bar nothing happens. None of the functionality seems to work. Not sure if I am missing something. I was seeing $ is undefined, that was before I added jquery.deps.js. Once I added that js file, the error went away in the console. I dont see any errors in the console now when running the application but the functionality is not working.

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

15 Nov 2016, 11:08

Hi,

In layout.js everything is wrapped inside of an ultima object so in your root you should do something like this:

Code: Select all

declare var Ultima: any;


Above the metadata. And then you should initialize it like this:

Code: Select all

ngAfterViewInit() {
        Ultima.init(this.el.nativeElement);
    }

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 11 guests