Posts by celsomtrindade • 8,038 points
240 posts
-
1
votes2
answers818
viewsA: Block click the menu item after the first click
You can do it two ways. Using class (or even attribute - just define your css like this a[disabled] {...}) with the property pointer-events. .disabled { pointer-events: none; } <a href="#id"…
-
6
votes5
answers1033
viewsA: What is the definition of each css selector combination
Each definition method directly implies how the style is assigned to the element, class or id in its HTML. We have 4 main selectors, which are: Element: Are native elements of HTML. Ex.: p, li, ul,…
cssanswered celsomtrindade 8,038 -
1
votes0
answers273
viewsQ: Calling PHP files and functions via Angularjs
Before going into the matter, I would like to clarify that I already have a working method. However, as I do not possess as much knowledge in backend, more precisely in PHP, I don’t know how…
-
1
votes0
answers241
viewsQ: How to deploy user from all devices?
I am working on an application and this doubt arose me while doing some tests, where I ran some changes, such as password change, on the computer but my user remained logged in to the mobile phone.…
-
4
votes1
answer984
viewsA: Error showing/hiding Div with Angular.js
You can make an event allied to the directive ngClick, that will detect the click on the element, see the example: ng-click="btnArea = !btnArea; btnPonto = false" ng-click="btnPonto = !btnPonto;…
-
3
votes1
answer1023
viewsA: Directive to detect click out of an element?
The simplest method of creating a directive that gets the result you are looking for, would be to use the element.bind('click'); that will detect the click on the element. Just one detail before…
angularjsanswered celsomtrindade 8,038 -
-1
votes2
answers369
viewsA: setTimeout does not work with For in javascript
I believe what you’re looking for is setInterval and not the setTimeout. setInterval: Will run 1 time every 2 seconds; setTimeout: Will wait 2 seconds to run all the code; Try the following code:…
javascriptanswered celsomtrindade 8,038 -
2
votes1
answer210
viewsA: Angular ng-show , does not remove C#/Angular/Javascript code
To begin with, you must understand the concept of ng-show and ng-Hide. They will only control the visual display of the element, ie, is the equivalent to use display: none;, however, the html…
-
5
votes2
answers51
viewsA: PHP-get the last 4 id’s inserted in the database
I believe the code you’re looking for is: SELECT id FROM Products ORDER BY id DESC LIMIT 4; Beyond the LIMIT 4 you must order in descending order, so that you look for the last 4 and not the first…
-
15
votes4
answers2450
viewsA: What is the :: (two-point double) in Angularjs?
Complementing the answers trying to explain Why and Like we should use the expression. Methods of use In addition to the classic use with {{::meuModelo}} can also be used through the directive…
-
1
votes2
answers783
viewsA: CSS - How to select the last sibling?
It is possible to get the result you are looking for using only CSS yes, however, as stated in the comments, its structure HTML would need to change. Correcting what you said about trying using the…
-
7
votes1
answer478
viewsQ: What is the security in using input "password" or "text"?
Recently we are on a wave to use the combination of input of passwords with the option to hide/display the password (*** -> abc), with the "eye" technique. I understand this purpose as it greatly…
-
-1
votes2
answers2237
viewsQ: PHP insert a data array into a mysql table
I have an array in php that contains some data, example: Array ( [nome] => Nome [sobrenome] => Sobrenome [genero] => 1 [email] => [email protected] ) And I would like to insert this data…
-
0
votes3
answers367
viewsA: Run a SELECT JOIN with conditions for different tables
After some tests and some attempts based on the first 2 answers, since none solved the problem directly, only guided me to the final result, this was the final code I used and ended up solving my…
-
3
votes3
answers367
viewsQ: Run a SELECT JOIN with conditions for different tables
I’m making a system of ticket where I have the message table of each ticket. This message can be sent by both an administrator and the user who opened the ticket. With this, I have the problem when…
-
3
votes1
answer94
viewsA: How to calculate columns equal to Skeleton
Indeed, it is a rather complex puzzle to solve. After some tests and some research, it was not possible to obtain the result of 4.66..67%, but I arrived in 4,25%. According to this problem in the…
-
1
votes1
answer251
viewsA: How to perform a callback after an "ng-show" or "ng-Hide"?
How you only want to create the visual effect and display the content only after the loading screen has disappeared and still be able to use it $scope to control when each div will be…
-
1
votes1
answer35
viewsA: problem with Submit
The directive ngSubmit should be set in the form, not the button, as you did. That’s why it’s not called. Your form should look like this: <form id="frm" class="uk-form-stacked"…
-
12
votes2
answers1508
viewsQ: Choice of hash generation method in PHP
My doubt started when I decided to re-examine the method I was using to get the user’s password and store it in the database. After reading that one, that one and that one questions here on the…
-
4
votes1
answer450
viewsA: Force angled to reanalize ngClass when screen width changes
You can define the following function within the .run .run(function($window, $timeout, $rootScope) { var timer; function verificaTela() { var width = $window.innerWidth; if(width < 600) {…
angularjsanswered celsomtrindade 8,038 -
2
votes1
answer410
viewsA: Does Angularjs not read input of the Hidden type?
Reading more of the subject and doing some tests, I noticed that this is the "expected" behavior of AngularJs when related to the field input and forms in general. In older versions, this was due to…
angularjsanswered celsomtrindade 8,038 -
0
votes2
answers328
viewsA: Gulp Watch does not update
I’m not very advanced on the subject Gulp, but as in Grunt, for example, the method default is just the name of the process to be called. With this you can create a task list. For example, suppose…
-
1
votes2
answers1320
viewsA: How to load scripts within a partial in Angular.js SPA
They are not executed because they need to be linked to a module which, if there is no insertion service, should be initiated at the beginning of the application. The method I know, and also the…
-
2
votes1
answer117
viewsA: doubts with if Else in java script
The code .success(function (data) { //... } Returns the following object: date - {string|Object} - The Response body Transformed with the Transform functions. status - {number} - HTTP status code of…
-
7
votes3
answers4688
viewsA: What is the difference between Function() {} and () => {}? Why doesn’t $http.get work?
I may be mistaken, but I read an article by Angularjs (I’m not finding the reference now) that dealt with this specific issue when combined with the use of the method syntax as, where it is common…
-
3
votes2
answers83
viewsQ: Result SQL has field and index
I have a PHP function to automate the queries I do: //arquivo funcao.php function executaSql($sql, $param=array()){ try { include "config.php"; $q = $conn->prepare($sql); $q->execute($param);…
-
10
votes1
answer14408
viewsQ: Block direct access to files and directories
Well, my doubt is simple: How can I block direct access to files and directories on my website? For example, prevent the user from accessing the link: www.meusite.com/img and get the list of images,…
htaccessasked celsomtrindade 8,038 -
1
votes1
answer207
viewsA: Top element animation - ngShow/ngHide
It is possible yes. First you need to use the module ngAnimate, of own AngularJs. //Load do arquivo <script src="seu/caminho/angular-animate.min.js"></script> //Injeção do módulo…
-
3
votes3
answers7601
viewsQ: Get time and date independent of system time
Well, I’m having trouble getting the date and time in Javascript when the computer, or the system has this incorrect data. Official time: 08:35 - 07/14/2016 - Brazilian Time Computer time: 23:46 -…
-
2
votes1
answer169
viewsA: Function does not run without setTimeout
If that function vm.selecionaFiltros is called automatically, the possible problem is that it is happening outside the scope of the AngularJs. What does that mean? It means that the digest cycle has…
-
0
votes1
answer1395
viewsQ: Use PHP Websocket Ratchet online
I’m trying to use the Ratchet to create WebSockets in PHP on a site I own. When I did the tests (localhost) everything worked perfectly, but when I try to put online, it does not run the connection.…
-
1
votes2
answers1475
viewsA: Send 2 Json objects to $http in Angularjs
It is not possible to send 2 objects the way you are doing as the service $http expects some parameters to be sent by default. According to the documentation of Angular, that you can read more here,…
-
2
votes2
answers254
viewsQ: Difference between relational table and online record
I have a structure of companies and categories organized in 3 tables: empresa -> Registration of all registered companies. categoria -> Registration of all registered categories.…
-
4
votes1
answer257
viewsA: Visible constant throughout the application
There are some methods, such as the use of $rootScope (which is the most common and also the worst) that creates a global variable. But you can also (by the way, MUST) use a constant to this end,…
-
1
votes1
answer916
viewsA: Understanding position, display and float in responsive layout
Position I defined the element with a fixed position, absolute or relative, either on the basis of the page or on the basis of its parent element. Example: /** * Neste caso, não importa se a div…
-
3
votes2
answers918
viewsA: MVC - pass a php variable to the angular.js controller
To do this, you need to make a request to get the data because it is not possible to insert php directly at the angle, as is done in a view, for example. For this you need to use the service $http,…
-
2
votes1
answer450
viewsA: Angular.js - Filter an array in a table based on user input - HTML
Just change it here: <tr> <td ng-repeat="x in names | filter:test">{{ x }}</td> </tr> for <tr ng-repeat="x in names | filter:test"> <td>{{ x }}</td>…
-
5
votes1
answer6060
viewsA: Darken background when opening modal window/div
Considering that all the functionality is ok (as you stated in the question), just make it add a 2nd element, done this, control the display with the z-index. Example: .try-modal-overlay { position:…
-
6
votes1
answer1749
viewsQ: Limit login attempts by time and quantity
I am working on a login system with php and mysql and this doubt arose, because I do not know if only this can be considered something "acceptable" as another security tool in the login process.…
-
4
votes2
answers711
viewsA: Where to put the business rule at the angle?
If I understood your question correctly (and if my experience can answer it well) I would say that you are not doing it wrong. In Angular, things get kind of "scattered" even, the big question is…
-
2
votes2
answers178
viewsA: Problem at angular 1.5 running with minified files
The problem is caused when you try to apply a text bind in html mode, i.e. ng-bind-html without the use of the module ngSanitize, which is responsible for 'lapidar', shall we say, this text for the…
angularjsanswered celsomtrindade 8,038 -
1
votes1
answer265
viewsQ: Identify and archive old Mysql records
I am working on a project using database in MySql where some areas will be constantly fed generating a high number of records in a short time, such as an area for maintenance tickets. However, these…
-
0
votes1
answer104
viewsA: How to disappear with the Parallax effect with angular?
Your use of ng-class is wrong. The correct definition would be: ng-class="{'fixo': meuValor}" //Onde "meuValor" é um $scope do controller ex.: $scope.meuValor In this case, the class fixo will be…
-
2
votes2
answers462
viewsA: How to implement Angular features?
Short answer: ngMaterial is a library similar to bootstrap, but focused on Angular and design based on Material Design. Long answer (pull the chair): Not always include all these links are required.…
-
0
votes1
answer58
viewsQ: SQL Select unique categories sorted by popularity
I am trying to get a list of categories that are in use and then sort them based on the number of records to be able to assemble a list of categories and use in the site filter. So they must follow…
-
1
votes2
answers1512
viewsA: Send data through Angular
Your input it must be so: <input type="text" class="form-control" ng-model="cadastro.nome" id=""> With this, inside your controller you will be able to access each property as an array, as…
-
1
votes1
answer62
viewsA: Modify css/js links with Grunt after concatenating and minifying
There are some. I particularly use this: https://github.com/dciccale/grunt-processhtml I like this plugin because it allows not only rename the files, but recreate blocks or remove, according to…
-
4
votes1
answer876
viewsA: Why use container inside navbar’s in Bootstrap?
Rows must be placed Within a . container (Fixed-width) or . container-Fluid (full-width) for Proper Alignment and padding. In Portuguese: Rows should be placed inside a . container (fixed width) or…
-
1
votes1
answer1981
viewsA: Consume REST service from Angular - Return JSON
This happens because for you to pass the result of an Angular controller to the view (html) you need to do one bind. This is done in 2 ways: <p>{{ nomeDoScope }}</p> <p…
-
0
votes2
answers351
viewsA: Angular filter with ng-repeat giving strange error
If you care about performance, DON’T USE PIPE FILTER (eventos | filtraEvento:filtro) //Não use o filtro assim ' | filtro' Each $Digest interaction, regardless of whether it originated from the…