angularjs - How to pass dynamic data from one module controller to another module controller -


And other things are working properly. This is my code

loginModule.js

  (function () {var app = angular.module ("waleteros", [" {$ RouteProvider. ("/", {TemplateUrl: "views / login.html", Administrator: "LoginCtrl", "ngRoote", "ui.bootstrap", "NgCookies"]); app.config (function ($ route provider) }}}})   

app.js

  (function () {var app = angular. Module ("vault "Admin": "home administrator"}}})   

loginCtrl.js

  (function () {var App = angular.module ("waleteros"); var LoginCtrl = function ($ scope, $ location) {$ scope.signIn = function (email, pin) {// some authentication code ... // Here I use the username Homectrl.js window.location.href = "views / home.html"}} I want to pass the app. Controller ("Login", LoginControl);})   

HomeCatal.JS

  (function () {var app = angular module ("waleterosAdmin" ); Var Home eCtrl = Function ($ scope) {// Here's how to get us a username} App.controller ("HomeCatlan", Homecrol);})    

You can share the service between modules, and in this way you can pass the value between the modes like this, here's a look, and here

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -