angularjs - angular how to define multiple controllers -


i have code

angular.module('mywidget', ['$scope']).controller('testcontroller', testcontroller);

i want add controller ..say ...controller("test2controller",test2controller)

just wanted know how can achieve ?

you can

var myapp = angular.module('mywidget', ['$scope']); myapp.controller('testcontroller', testcontroller); myapp.controller('test2controller', test2controller); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -