Materialize: Can't get Materialize work with Angular 4.

Created on 20 Apr 2017  路  5Comments  路  Source: Dogfalo/materialize

I'm pretty new to this so please bear with me as I have been trying for hours.

I installed Angular 4 and Materialize.css using npm. How do I get the click effects on buttons and such to work? I cannot figure it out on my own.

I have seen some things on the internet but there doesn't seem to be a clear solution to this problem. It's also my first time using npm so I might be forgetting something.

thirdparty

All 5 comments

I'm not familiar with angular's specifics, but shouldn't you be able to use something along the lines of

$("#myButton").click(function() {
  // do stuff
});

where you have a button with id myButton

I will take a look at your suggestions soon. It's getting late so I will give that a shot sometime in the weekend. Thanks guys.

@EddyVinck We did a wrap of Materialize with Angular 4 at https://github.com/sherweb/ng2-materialize.
Not all features have been wrapped.

@scote thanks!

Was this page helpful?
0 / 5 - 0 ratings