KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I create some sort of utils bundle that would be accessible from all my controllers? I have this route code in my main module: 'use strict'; angular.module('lpConnect', []). config(['$routeProvider', function($routeProvider) { $routeProvider. when('/home', {template: 'views/home.html', controller: HomeCtrl}). when('/admin', {template: 'views/admin.html', controller: AdminCtrl}). when('/connect', {template: 'views/fb_connect.html', controller: MainAppCtrl}). otherwise({redirectTo: '/connect'}); }]); I want a function that can be common to HomeCtrl , AdminCtrl and MainAppCtrl . How should I do it in AngularJS?
Tags (comma-separated)
Save Edits
Cancel