Questions tagged as 'angularjs-factorys'

1
answer

Doubt in AngularJS! (Factory, Controller, View) Why is 'identity' not updated in VIEW?

I have a question in AngularJS! The source code is at link In the factory I have a property named identity , which is mirrored to the controller and displayed in the view. When adding a new message this property is incremented corr...
asked by 25.01.2016 / 21:05
1
answer

Share object between two controllers in angularjs

I am studying AngularJS and I am trying to make a CRUD simple, but I am not able to have the same object of my listing for my form, that is, when I click the edit button go to the completed form by the object. I have Factory...
asked by 11.07.2016 / 18:32
0
answers

How to inject a Factory when creating a unit test with angularJS?

Good afternoon! I am creating a unit test for my controller and it is giving the following error:    TypeError: Can not read property 'saveUser' of undefined             at Scope.UserFormCtrl. $ scope.save I saw that the problem must b...
asked by 18.05.2017 / 20:07
1
answer

Display mysql data using angularjs / codeigniter

I'm developing an application in CodeIgniter 3 and I came across the following problem. I want to import the data from the database table and display it on a php page. In my controller I created the function: public function relacionar() {...
asked by 01.02.2016 / 22:26
2
answers

Injection error of module dependencies in angular

I have the module for my application: angular.module('app', ['app.controllers','app.routes','app.services']); I have my services module: angular.app('app.services', []) .factory('usuarioService', ['$rootScope', 'renderService',...
asked by 26.04.2016 / 21:38
1
answer

AngularJs Factory in another file

Good morning I want to create a separate file for each factory that I have to declare in my project, but it is not working: App.js file var GestaoGastos = angular.module('GestaoGastos', ['ngMaterial', 'ngRoute', 'ngMessages', 'ngResource...
asked by 08.01.2016 / 13:42
1
answer

How to pass this variable to the scope?

(function () { angular.module("Hawking").controller('loginController', function ($log, $scope, validateUser) { var dataUser = { email: "[email protected]", senha: "123456" }; validateUser.getUser(dataUser).then(fun...
asked by 27.05.2017 / 22:31
1
answer

Working with Factory

I am developing a system for a cafeteria, where it will have to register the cities and within the cities the districts with their due freights, the problem is occurring the first time that occurs the registration of the first neighborhood of th...
asked by 20.01.2016 / 14:18