Questions tagged as 'angularjs'

2
answers

How to redirect page in Angular?

After completing the data update, I want the system to redirect the user to another page. I am using ui-router and was instructed to use $ state.go. But how do I use this command? Follow my code: app.controller("AtualizarUsuarioController",...
asked by 11.01.2016 / 18:44
2
answers

What is the difference between "this" and "$ scope"?

No AngularJS we use $scope to share information between domains of a controller . There is also the Controller as syntax that allows us to use this for the same purpose. With $scope : function MeuCo...
asked by 02.06.2017 / 14:28
1
answer

Save image link as file in local storage

How can I save a link ( http://example.com/img.png ) in the file format, which in this case is .png, using JavaScript and saving local storage with $localStorage of AngularJS?     
asked by 26.11.2015 / 17:03
1
answer

How to work with ui-mask in input angularjs

<form name="myForm" ng-submit="addState(myForm.$valid)" novalidate > <input ng-model="data.cnpj" type="number" ui-mask="999.999.999-99" placeholder="CNPJ" required ng-minlength="6" ng-maxlength="12" ng-pattern="/^[0-9]{1,7}[-\.\...
asked by 28.01.2015 / 20:18
2
answers

Open link in a new tab without the target or window.open

I have a function that does a redirect: vm.pagarUpload = function() { $http({ method: 'POST', url: API.url + 'app/service.php?t=pagarUpload', data: { nome: vm.nomeUpload, email: vm.emailUploa...
asked by 18.12.2017 / 12:38
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 hide the keyboard in the cord by pressing "Go" or "Done"

I have a form in my app, and I would like that after filling, if the person pressed Ir or Done , the keyboard disappeared. Has anyone ever gone through this? Or do you know how to solve it?     
asked by 30.01.2015 / 13:24
1
answer

Doubt with ng-repeat

I have the following code: <div id="box-1" class="box"> <div ng-repeat="task in contato " style="margin-top: 5px"> <div class="md-card md-card-hover"> <div class="md-card-content"> <d...
asked by 27.08.2017 / 15:26
2
answers

Retrieve error message via json no Angular

I'm trying to register using Angularjs, but I want to get the validations that are in my model in rails. But I'm having trouble: Covenat (model) Rails validates :name, presence: true Covenat Action Create controller def create @cove...
asked by 14.04.2015 / 18:20
2
answers

Use Jquery library with AngularAMD

I'm implementing AngularJS + RequireJs through AngularAMD. I want to add the Jquery library but it returns the following error when I use "$":    Error: $ is not defined I have main.js set up as follows: require.config({ baseUrl:...
asked by 21.04.2015 / 20:28