Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sharing same function between 3 controllers
Message
From
17/02/2015 17:00:01
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01615503
Message ID:
01615506
Views:
43
Put it in its own js file. If you bundle them, it won't be an additional performance hit.

>>You should know that you never repeat code. Create a class called Shared and put it in the Contollers folder.
>>
>>Note: this isn't the best way, but it's easy and gets the job done. Much refactoring would be needed to do things a better way.
>>
>
>I am talking about JavaScript code, not the c# code here. I want to share same function between angularJs controllers which are defined in the same .js file and are in the Scripts folder under particular area.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform