Posts by OnoSendai • 36,218 points
614 posts
-
4
votes1
answer900
viewsA: How do I call a right phone number from my ANGULAR JS AND IONIC app
Simply use protocol moniker tel: in an element href. Example: <a href="tel:+6494461709">61709</a>
-
2
votes1
answer661
viewsA: Angularjs - multiple tabs in the same browser
sessionStorage belongs exclusively to the session browser, which is linked to the page. If you want to share content between two or more tab/windows, use localStorage. Example of implementation:…
-
3
votes2
answers698
viewsA: How to send form parameters instead of angular JSON?
You can use the service $httpParamSerializer to modify an object and prepare it for sending, en set with a specific header indicating the type form-urlencoded. $scope.submitForm = function(data) {…
-
4
votes1
answer407
viewsA: Solution . Net with Membership does not connect to oracle base
There are several (1) inconsistencies(2) and instabilities(3) documented usage of unmanaged ODP.NET that may depend, among other factors, on the client version and the installed Assembly. The…
-
4
votes2
answers737
viewsA: Angular Controller does not render on my Index
You have a circular reference there. app.controller('TipoContatoOperadoraController', ['$scope', '$http', TipoContatoOperadoraController]); In the definition of TipoContatoOperadoraController you…
-
3
votes4
answers1965
viewsA: How can I detect the visibility of an element (without jQuery)?
Use the method window.getComputedStyle(); var escondido = window.getComputedStyle(document.getElementById("element")).display === 'none'; This method assesses whether the element or one of his…
javascriptanswered OnoSendai 36,218 -
5
votes4
answers1025
viewsA: How to make a LOOP run according to the return of a Promise (promise)?
You can use the concept of queues (queues). Prepare a collection containing the items you want to process, and perform individual processing until the queue runs out. One of the advantages of this…
-
0
votes1
answer36
viewsA: Problems with using Angularjs ui-route
Move the header into the view, or share the loaded item on view with header - via service, for example, or (not recommended) $rootScope. (Post your code. So we can suggest implementations based on…
-
0
votes1
answer60
viewsA: Multiple views with uiRouter
Two possibilities: Apply the menu and sidebar only to subroutes of a given route - in the example below, modulo: 404 login module contact register Control the visualization of the two sections via…
-
8
votes2
answers5043
viewsA: What is the meaning of a "Manifest" file in programming?
Trivia: The term originates from nautical practice, where the cargo manifest list all items (cargo or personnel) dispatched: SS passenger manifest La Touraine (USA), October 1913, pp. 204-05, for…
terminologyanswered OnoSendai 36,218 -
3
votes2
answers104
viewsA: How to check with binary operations?
If you want to target in a binary way, one possibility would be to use bit flags in a practice called bit masking. The operation is quite simple. Let’s say you have 8 error categories, and want to…
-
4
votes1
answer504
viewsA: Angularjs - What is the best practice when uploading images?
The answer will depend on the requirements of your application. What you implemented was a process synchronous and linear. You can implement: An upload process in parallel and asynchronous, where…
-
2
votes3
answers1082
viewsA: Angularjs does not work properly
Your ng-app marker is set in the tag <head>. This makes the application does not see the content in <body>, since the application ends in </head>. Changing it to the tag…
-
1
votes1
answer106
viewsA: Doubt with angular and checkbox
In the example below the element t0080_pbm_testado is correctly marked as checked via Dirty checking Angular after 3 seconds: function SampleController($scope, $timeout) { $timeout(function() {…
-
2
votes1
answer63
viewsA: Play! Framework - How to load public files (js, css, img) once?
Angular is a framework for Spas (Single Page Applications). It’s easy to preserve data between scope changes - however if you’re reloading your application you need to store it between loads.…
-
1
votes1
answer395
viewsA: Check Angularjs Login and Password
This happens because the method Users.getByLogin() is asynchronous. Your error occurs because at the time the line console.log("Senha: " + systemUser.password); the return of getByLogin has not…
-
5
votes2
answers1104
viewsA: Oracle SQL result ordering
Quick and dirty solution: Reorder the positions of the intrinsic values of the LOT column (day/month/year) to a format that returns the correct order (year/month/day): ORDER BY SUBSTR(TO_CHAR(LOTE),…
-
13
votes2
answers551
viewsA: What is the point of an explicit C#interface implementation?
This has to do with object scope isolation. At the beginning of the example you mentioned, we can see that two objects are created, each with a different view of the object: IControl ctrl =…
-
3
votes2
answers875
viewsA: Concatenating Javascript Object
Your original code is doing the following: Starting a bond, k; Initiating a sub-loop, x; Initializing an array type variable, donutData; Populating donutData with an element via method push(). Note…
-
6
votes4
answers6154
viewsA: How to get session cookie via javascript?
To create a cookie for session, just associate a string containing the format chave=valor to the property cookie of document: document.cookie = "[nomeDoCookie]=[ValorDoCookie]"; If you wish to…
-
5
votes5
answers1744
viewsA: Difference between back-end and front-end?
TL;DR - Depends. Long version: You should take into account data traffic and user experience. If your data volume is small (a few hundred records), simply transfer the complete collection to the…
-
1
votes5
answers98
viewsA: Conversion of object properties to numbers
// Objeto original: var oSrc = { "name": "testy McTestFace", "age": "21", "canDrink": "1", "canDrive": "false" } //Conversão de propriedades for (p in oSrc) { // Para cada propriedade, oSrc[p] =…
-
5
votes2
answers754
viewsA: How to change the last 100 table records in the Postgresql database?
Operations UPDATE do not receive parameters ORDER BY. You need to select the records first: UPDATE titulo SET autorizado='S' WHERE id_titulo IN (SELECT id_titulo FROM titulo ORDER BY id_titulo DESC…
-
2
votes1
answer109
viewsA: Error trying to install Visual Studio 2013: Acess Denied KB2829760
It seems that your error is due to problems with incorrect permissions in the Access Control List (ACL) in some parts of Registry. kb2829760 is called Visual Studio 2013 Updates. Since the error…
visual-studioanswered OnoSendai 36,218 -
2
votes2
answers484
viewsA: Global variables do not update in the view with Angularjs
I may be wrong, but I believe the definition of controller within an object consumed by when() should point to the name of the declared function of a controller, and not to a file .js - even because…
-
2
votes1
answer60
viewsA: Banner Rotary
Version using $timeout as timer. Note that the swapSlide method both selects the slide to be displayed and defines a timed auto-call. var app = angular.module('sampleApp', []);…
-
2
votes2
answers105
viewsA: What are dependencies in a framework for?
I think this is a case where an image can be worth a thousand words. This is a basic map of the dependencies of framework Nyan: This framework proposes to offer a framework capable of exposing a…
-
4
votes3
answers636
viewsA: Less is a programming language, or just something more complex than CSS?
LESS is a style sheet language dynamic, but not a programming language - because it is not Turing-complete. Its main features are: Variables @pale-green-color: #4D926F; // Definição de variável…
-
3
votes2
answers2426
viewsA: How to access Web API posted to IIS externally
A complete answer depends on how your environment is structured, and is not trivial. I will list the requirements in a superficial way; you need to solve the details. I’m taking over: A typical…
-
19
votes1
answer413
viewsA: "Referer" or "Referrer"? Is that a spelling error or is that correct?
It is a spelling error in the HTTP protocol specification that has been maintained by use. The referer, or HTTP referer (is misspelled as a referer in the official HTTP specifications and has been…
-
3
votes1
answer67
viewsA: tags saved in bd being printed as text
Use the directive ng-bind-html to display HTML content: <span ng-bind-html="variavel"></span> If the $sce service is enabled, you will need to mark the HTML content as reliable. In this…
-
1
votes2
answers703
viewsA: show angular variable in iframe
use a combination of ng-src with the permission of the source in the ombudsman $sce. Functional example to follow: var app = angular.module('sampleApp', []); app.controller('SampleController',…
-
2
votes1
answer725
viewsA: Border Radius in table with border Collapse
Utilize border-spacing:0 instead of border-collapse: collapse. table { border-spacing:0; } .item1, .item2, .item3 { border-top:1pt solid black; border-bottom:1pt solid black; } .item1 {…
-
8
votes3
answers161
viewsA: Are objects similar to arrays?
TL;DR: Yes, generic way - with a few poréns. Long answer: All prototypical javascript types (Boolean, Number, String, Function, Array, Date and RegExp) are implementations that expand the behavior…
-
2
votes2
answers115
viewsA: How to delete data from google maps
Your Google Maps interface implementation does not require any changes. Values are being read from variables created in $rootScope: var infowindow = new google.maps.InfoWindow({ content: "Dia da…
-
0
votes1
answer98
viewsA: Change Meta Tags dynamically Angularjs
The only Crawler that interprets JS before capturing tags meta is the one from Google - and yet there is no guarantee that your javascript content will run. One output can be the interpretation of…
-
0
votes1
answer155
viewsA: Function to return levels of an object in Javascript
Assuming you are using Windows, you can use a batch file to generate a JSON representing your directory structure: dir2json.bat [diretório] >[arquivo destino] Example: dir2json.bat .…
-
1
votes3
answers657
viewsA: Display values with angular
ufs is a array, not an object with keys and values. Instead of using <option ng-repeat="(key, value) in ufs">[{value.sigla}]</option> Try <option ng-repeat="value in…
-
1
votes1
answer1888
viewsA: How to insert an Angular directive into HTML using an external script?
This is because you are creating DOM objects without giving Angular the opportunity to compile them. The code below implements dynamic directive creation and service compilation $compile: var app =…
-
2
votes2
answers571
viewsA: Variable Undefined
This may be happening because of variable definition scope. In the example below contador is defined twice, once in the overall scope and once in a function containing the function addCampos. The…
-
4
votes4
answers256
viewsA: What’s the difference between creating a module normally and creating a module within a function?
The first format isolates the function of variables declared in the global scope. Thus, all variables declared within the function are restricted to the scope of the function, not influencing the…
-
7
votes1
answer2860
viewsA: When should I or should I not use the if without keys?
The IF without keys causes only the next expression to be evaluated. In a variation of your example 2, if(variavel == true) variavel1 = 55; //Será executado apenas se variavel == true; variavel2 =…
-
4
votes3
answers11314
viewsA: if inside an ng-class in Angularjs
The short-if is correct. However ng-class has a differentiated evaluation behavior. You are calling a function(setClass) which will not be re-assessed. since Angular works with Dirty-checking, you…
-
0
votes3
answers417
viewsA: Access different objects from a Json with Angularjs
A small adjustment in the collection setting categories of each item corrects its JSON, allowing the angular to correctly interpret the object. Click on Execute code snippetto see it working:…
-
9
votes1
answer476
viewsA: REST - Http x Json
TL;DR: Not Not Not Not Version not so short: Http is Rest? HTTP is an application protocol that specifies hypertext traffic and behavior; REST is an architectural style whose focus is data elements.…
-
1
votes1
answer331
viewsA: Check that framework 3.5 is installed on the machine
The physical location of the files is different from the Registry. Regardless of where . NET was installed, a key on Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5 will be created. The method…
-
4
votes2
answers673
viewsA: Sum of values in Array returns Nan
In your calculation function assume a value default for items that do not have the property adicional: $scope.total += value.quantidade * (value.valor + (value.adicional || 0)); // Operador…
-
3
votes1
answer38
viewsA: HTML: Anchor point - what is it?
Instead of <a href=“#top”> Back to top </a> Utilize <a href="#top"> Back to top </a> (In its original version, the property definitions href are not single double quotes, and…
-
3
votes2
answers1034
viewsA: How to pass an array that is in the controller to a directive
You can use the $note standard to receive notification of changing attributes in the directive call. A functional example follows below: var app = angular.module('sampleApp', []);…
-
14
votes6
answers2300
viewsA: AJAX is not a programming language. So what is it?
AJAX (in English Tosynchronous JavaScript and XML, or Javascript and asynchronous XML) is a term used for asynchronous communication practices between a web application and a corresponding back-end.…