Questions tagged as 'angularjs'

3
answers

How to add and remove items from a json easily?

I have a json similar to this [{id: 1, titulo: 'compra', valor: 50.00, data:'2014-10-23' },{id: 1, titulo: 'compra', valor: 60.00, data:'2014-10-24' } ] I have a function to add, which adds a new item and one to remove. The add function is...
asked by 16.02.2015 / 21:51
1
answer

Dynamic directives with angular js

I'm building an application that needs to render a dynamic form. The form data comes from a json , and in it, I have the fields configuration. Here's an example: { "Fields": [ { "title": "Assunto", "type": "text" }, { "title"...
asked by 26.02.2015 / 23:29
2
answers

AngularJS ng-repeat does not return data, returns always empty

I have a query to an API that theoretically is returning the data, at least in the console shows me the same. But in View with ng-repeat is not bringing anything. Below is the code I'm using: Factory: pcFactories.factory('Teache...
asked by 07.04.2015 / 19:15
1
answer

Error with angularJS with $ http.get

I'm trying to get some data via WS (Web Service), but when I ask to return in my app it gives this error:    In 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. But...
asked by 05.05.2015 / 20:06
1
answer

How to access a directive through a controller?

Does anyone know if it is possible to access a policy through a controller? The idea is for my controller to check a flag that is instantiated in the policy since it checks to show some results. I do not have a specific code because I want...
asked by 09.12.2014 / 17:56
2
answers

Remove array from array array

I have the following data in an array var array = [ ["755", "20", "E", "274", $$hashKey: "0AK"], ["756", "20", "E", "274", $$hashKey: "0B7"], ["455", "30", "E", "159", $$hashKey: "0BQ"], ["7...
asked by 25.11.2014 / 18:33
1
answer

How to filter, with angular, JSON objects by an id belonging to another object inside the array

My question is how can I filter objects from an array by comparing the id that is inside a "sub-object". Type: animais [ { id: 34, nome: baleia, categoria: { id: 2, nome: mamifero }, {...
asked by 13.11.2014 / 18:37
1
answer

Paging effects with javascript

Does anyone know how to answer me how to make paging effects on my HTML page? For example I have a table but this table can only display 10 records at a time, does anyone have any idea how to do this using angularjs or jquery?     
asked by 27.01.2015 / 23:44
2
answers

Angular Object Sharing

Does anyone know of a way to send an object from one angular directive to another? I have 2 directives and need access to the object in both. I'm not able to go through a parameter initially since the function is called through an event....
asked by 30.01.2015 / 14:29
1
answer

Appear menu with ng-click + ng-class

I'm trying to make a side menu that appears when the user clicks a button, using a .is-visible class <button ng-click="visible=!visible;">Click me to open the menu!</button> <div ng-class="{'is-visible':visible}" class="menu">...
asked by 22.09.2014 / 19:00