Questions tagged as 'angularjs'

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

Problem with html5Mode angular

I installed my application Angular using #! in the links url, now I'm trying to use html5Mode but it's not working. The folder structure of my application looks like this: In the root is index.html , a folder with t...
asked by 25.05.2017 / 19:30
0
answers

How to disable the angular route system

I have a project developed in angle 1, I'm using routeProvider and locationProvider. But now that the project is "ready", I need to deactivate the route system, that is, when the URL is changed, when I go to another page, I need the page reloade...
asked by 16.05.2017 / 20:38
1
answer

Why can not I use $ window.localStorage.setItem () with angle?

After registering, I'm temporarily wanting to put some data in localStorage, but I'm not getting it. Follow my code: app.controller('cadastroCtrl', ['$scope', '$stateParams', '$http', '$cordovaSQLite', '$window', '$state', function ($scope,...
asked by 15.05.2017 / 22:30
1
answer

Can you make an event after a Javascript impression?

I would like to do a post impression action, ie only when the user confirms the impression that the javascript will execute a scheduled event. If I put an event under window.print() javascript executes even without the user having printed...
asked by 12.05.2017 / 16:31
0
answers

server does not return data that I send with angular2

the component code onSubmit(form){ var success = false; var error = false; this.http.post('http://localhost/api/', JSON.stringify(form.value)) .map(res => res) .subscribe(dados => console.log(dados)); }...
asked by 19.06.2017 / 21:31
0
answers

pass selected index from one hmtl to another

Good afternoon Srs., I have a collection that is already visible by two distinct html's in my app, however in the first html I go through the collection through an ng-repeat and when I select a certain item from this list, I invoke the second...
asked by 19.06.2017 / 22:54
1
answer

What is the best way to update the token using the refresh_token in the angle?

I am developing an App (ionic v1) which, when communicating with the server (implemented with OAuth), returns a token and a refresh_token . What would be the best way to intercept a request, understand that it returned a 401 (invalid token...
asked by 14.05.2017 / 16:35
1
answer

Getting an element by the id after the repeat in an array - HTML / JavaScript / Angular

Hello, I need to get an element in the HTML after a ng-repeat, to apply CSS commands on the div on which it depends on the result coming from the database. For now I can only get this element, but the Style is only applied in the first item of t...
asked by 15.05.2017 / 18:49
1
answer

Angular assign data from a POST request

Good people I have the following code app.controller('lista', function($http){ $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; //this.feriados = <?php echo json_encode($feriados->feriado...
asked by 09.05.2017 / 12:47