Questions tagged as 'angularjs'

2
answers

Read JSON and show in html using angularJS

I'm trying to read data from a Json file in html using AngularJS, but I'm not getting it. Here is part of the index.html code: <div ng-app="app"> <div class="page-header" id="principal" ng-controller="HomeCtrl">...
asked by 29.08.2017 / 16:56
1
answer

How to sort by several fields with Ionic and / or AngularJS of a JSON?

I'm trying to sort fields dynamically by Ionic and AngularJs. I started by using the Modal Select plugin with the button like this: <button class="button button-stable button-block icon-left ion-android-restaurant" modal-select="" ng-mode...
asked by 07.04.2017 / 14:51
1
answer

Angular.js directive with dynamic templateURL

create.directive('renderInputs', [ function(){ return { restrict: 'E', scope: true, templateUrl: function(elem, attrs) { alert(attrs.type); return '../templates/inputs/type-' + attrs.type + '.ht...
asked by 19.04.2017 / 19:41
2
answers

How to create a regular expression to validate just a mobile number?

I made this expression, but I do not know if it is in today's patterns "/^[1-9]{2}\s?9\s?\d{8}$/"     
asked by 21.06.2017 / 18:46
1
answer

Catch only what was changed in an object

I have implemented a PATCH function to update the data of a resource, but I need to get only the updated data of an object already loaded on the screen to send in the request. What would be the most efficient way to do this? Can you use $ wat...
asked by 13.02.2017 / 12:05
1
answer

Angular ui router plus PHP

Currently I have an array in php that converts to JSON using json_encode json and generated without problems. $array = array('a' => 'Olá mundo', 'b' => 'Olá Marte'); $array = json_encode(array); //$array agora retorna {"a":"Olá mu...
asked by 15.02.2017 / 13:44
1
answer

Form field filled in but given as $ pristine

I am making a request $ http, the return is a JSON, attribution to the model ($ scope.elaborator), however the field is still set to $ pristine. Data.post('getElaborador', $rootScope.codigo, 'Listagens').then( function(success){...
asked by 15.12.2016 / 14:38
1
answer

Controllers in includes AngularJS 1

I'm having a very strange problem and would like it if someone understands my question, could you explain why that happens. My application is a player and this is composed of some timeouts for start and end controls of the media (it plays vid...
asked by 09.11.2016 / 17:40
2
answers

TabPanel does not work with angular

I'm making a screen that has some tabs, I do not have much familiarity with it, so I'm making an example: <div> <!-- Nav tabs --> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="act...
asked by 10.05.2017 / 15:57
1
answer

Ui-router for systems with many modules

I came across a problem I have a Controller called OrderController that is in two modules, Sales and Supply. When I make the route to the screen that will use this controller how can I define which of the two controllers I want to use, how can I...
asked by 17.09.2016 / 22:53