Questions tagged as 'angularjs-directives'

1
answer

Ui-Routes get the id of the logged in user

I'm using ANGULARJS / UI-ROUTES , and currently my application after login only keeps the email, I need to also have the user ID logged in. The issue of the routes I get, the problem is that he does not see the ID to be able to bring. I think...
asked by 26.05.2016 / 15:54
1
answer

AngularJS directive blocking ngModel

In an angular application, I drew a small system of tabs and in that system I implemented a directive to create the onclick events in each of the tabs. basically the project looks like this: stylesheet.css .-tabs{ width: 100%; disp...
asked by 18.08.2015 / 21:08
1
answer

Problem with simple validation message directive

I have the following directive: //diretiva responsavel por facilitar a passagem de campos para a validação App.directive("validateMsgFor", function(){ return{ templateUrl : "view/templates/validateMsgFor.html", restrict: "...
asked by 24.07.2015 / 04:00
1
answer

Policy to restrict typing with regular expression in AngularJS

I wrote a directive to inhibit typing from specifying a regex. However there are two bugs in this solution: In the first example input should allow only numbers or numbers followed by periods [.] , or followed by periods followed by nu...
asked by 15.01.2018 / 15:18
6
answers

Regular expression for phones?

I created a directive to format phones with or without the digit 9. Now I need a regular expression to validate if the number format is correct in ng-pattern . I created a regular expression but I'm still not getting results if the number...
asked by 05.01.2016 / 05:53
2
answers

How to use directive templateUrl with external controller?

I'm decoupling some components and I'm not sure when to create a controller linked to the template. I have for example the Login screen, in my directive I do: app.directive('appLogin',function(){ return{ scope: {}, restrict:'E',...
asked by 20.04.2016 / 16:30
2
answers

How to make null directives AngularJS?

The idea is to make when calling a unique directive, it render the directive corresponding to the preconfigured CSS framework. For this I have a global variable var window.styleSource = "bootstrap"; (after which I can set whatever valu...
asked by 15.04.2014 / 16:00
1
answer

Policy to create div, label, and input

Hello, I created a directive to create a div, a label, and an input, but the ng-model attribute is not working. In the example, the created dynamically does not work which is the first, and the created one that is the second one works. li...
asked by 01.12.2016 / 13:54
1
answer

Directive not being called, custom validator AngularJS

I have the following directive: .directive('validateCPF', function () { return { require: 'ngModel', link: function (scope, element, attrs, ctrl) { ctrl.$validators.cpf = function (modelValue, viewValue) {...
asked by 25.01.2016 / 12:59
2
answers

Show float field in currency format using filters in AngularJS

I'm working with AngularJS and to show the user a field using a comma, I'm unfortunately forced to make a replace on the point. I wonder if there are any filter or directive to solve the case. In my code, I need a floa...
asked by 20.01.2016 / 14:35