Join the Stack Overflow Community
Stack Overflow is a community of 6.5 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I'm trying to use metronic theme with Angular 2.

Theme has some global stylesheets and Javascripts files which is required for all HTML pages. So, I included all those in my index.html.

But each page has some extra Stylesheets/Javascript files that are specific to that particular HTML page, and is required to render properly.

Angular 2 has concept of components. So, for example, HTML of login page is rendered via a LoginComponent which has styleURL, where i can specify Stylesheets required for login page. But how to specify scripts for that particular page?

I tried using this method, but it didn't do anything.

share|improve this question
    
Just make script a part of Component. Method from the link you gave makes sense, what is the problem with it? – Andrei Zhytkevich Jul 7 at 11:38
    
It's not doing anything. Javascript library code is not being applied. No error in console. It's not making any difference – Kanav Jul 7 at 11:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.