Jump to content

Angularjs Experts .. Plz Come Here N Clarify My Doubt


Recommended Posts

Posted

How to declare a variable in one controller and access it from another controller

2) how to serialize form data

Posted

when you take the 1st crore you have t o put in it black bag...and then next advance will be serialized and given to the sources as breifed and we will work together in the future PK.gif

Posted

you need to inject it from Controller 1 to Controller 2. But these two controllers needs to be under the same module

Posted

you need to inject it from Controller 1 to Controller 2. But these two controllers needs to be under the same module

How to inject Ankul any examples?
Posted

use scope, injection can be done while declaring the cntrller.

 

 

 

angular.module('myApp', [])

 

myApp.contoller('xCntr',[])

 

myApp.controller(yCntrl',[xCntr])

Posted

Simple Bhayya.. use $rootscope approach or use Service oriented approach.

 

$rootscope approach lo , put the control1 variable into $rootscope, and acces the same variable in other controoler2.

 

 

Service oriented approach lo, put that control1 varaible to a singleton service . and inject that serice in controoler2 , and access that varaible..

 

 

Posted

Global ga declare chey variable Ni.....vere file lo extern chey....cho chimple

×
×
  • Create New...