Questions tagged as 'angularjs-scope'

1
answer

What is the difference between "=" and "" in the scope options of a custom policy?

In AngularJS, I was creating a directive. I noticed that when I used the = sign to capture a certain value from the controller scope, when I changed this value, the value of the parent controller was also changing. For example: an...
asked by 02.09.2016 / 16:33
2
answers

How to use a module in AngularJS?

I have the following code in AngularJS but I get the error:    Error: [$ injector: unpr] Unknown provider: AuthenticationProvider <   Authentication My code is as follows: app.js angular.module('app') .controller('HomeController',...
asked by 11.12.2013 / 17:35
1
answer

What is $ scope.answer?

I'm new to AngularJS, I would like to understand what the $ scope.answer really is for, I did not find anything in the official documentation or the web, I just saw it in an example I took in a tutorial, but I did not understand the importance o...
asked by 14.10.2015 / 15:13
2
answers

Angularjs - test assignment of a variable in $ scope in an asynchronous function

I want to test the following scenario: I have a scope: var scope; beforeEach(inject(function($rootScope) { scope = $rootScope.$new(); })); You need to test whether the assignment of a variable in the $ scope within an asynchronous fun...
asked by 22.02.2014 / 03:10
3
answers

How to access the $ scope variable?

I would like to know how I can access the contents of the scope variable in AngularJS? Theoretically I did everything "correct", ie declaring the variable in controller and assigning values in it: var app = angular.module('va...
asked by 18.08.2015 / 17:29
3
answers

Pass directive within template

I have the following scenario: I have a modal call directive and I want to pass another policy as content, the code is as follows: maintain-provider-form.js "use strict"; angular.module("fornecedor") .directive('manterFornecedorFormulario'...
asked by 27.10.2015 / 15:05
1
answer

Difference between scope statement

Is there any difference in this scope statement mentioned in the angular documentation: myApp.controller('DoubleController', ['$scope', function($scope) { $scope.double = function(value) { return value * 2; }; }]); for this scope? myApp...
asked by 21.05.2015 / 15:20
1
answer

AngularJS google chart with dynamic data

Example of how my code is http://plnkr.co/edit/hMnKAzjbkQzHWjL5p6KX?p=previewangularjs I get the data from the webService and I organize it this way. var avaliacoes_descTipo = []; var avaliacoes_quantidade = []; angular.forEach(data, fun...
asked by 15.08.2016 / 16:12
1
answer

What is the $ scope? $ apply?

I've seen in a code the $ scope. $ apply that uses AngularJS, what's it for? In the context you are in it is this way: var a = function(param){ $scope.$apply(function(){ var image = document.getElementById('img');...
asked by 05.11.2015 / 13:58
1
answer

What is $ parent in AngularJS?

I'm reviewing a PR from a colleague and I came across the use of $parent , I read a little in the documentation of the angle, but I can not understand what it does. Home Is it used inside a dialog created inside another, would it have any...
asked by 14.06.2017 / 19:45