Closed vwal closed 9 years ago
I would have assumed it should work, can you show me the code your using.
Also please let me know the version of Classy your using.
It might well work.. I've been looking at AngularJS for the past week, and still try to wrap my head around it :-). Hence, I might just be using it wrong; I couldn't find too many examples of using Classy with different aspects of AngularJS (such as constants). My embarresing exploratory code is available on Plunker. The version of Classy is 1.0.0 beta2.
When I click on 'testing', I get an error on the console: "TypeError: Cannot read property 'facebook' of undefined".
Another question I have is regarding (on my test code) the "testr" function. It it doesn't seem to be available the scope. Perhaps I've misunderstood how functions should automatically be added on the $scope. Would you have a further example available?
Thanks for your help!
http://plnkr.co/edit/kHMQfS7j7bGZV4q1M0m2?p=preview
Few things to note:
Hope this helps :)!
I was beaten to it by @wuxiaoying. :-)
My fork is pretty much the same: http://plnkr.co/edit/mBFTcl54CltGa5kwVyFO?p=preview
Thank you both for the replies. They were very helpful!
Hi,
Is it possible to use constants with angular-classy? I tried creating a constant (with
.constant
), and then injected ito th the classy controller (like I could inject a constant into a standard Angular controller). But the constant appears 'undefined' within the classy controller.Thakns for any insights on this!
Ville