Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sharing same function between 3 controllers
Message
De
17/02/2015 17:00:01
 
 
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01615503
Message ID:
01615506
Vues:
37
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform