Posts by Denison Luz • 271 points
11 posts
-
0
votes2
answers1014
viewsA: How to execute a function after Angularjs perform all get/post requests?
You can use events to send a "loading:finished" event, for example, and put a $Scope into a Controller or Directive "listening/Listening" that event and run when the event happens.…
-
1
votes2
answers891
viewsA: How to change the class of a :after in Angularjs using ng-class?
Take a look at the code below and see if it helps you. Or see it working on http://plnkr.co/edit/zmokTDQnJsArl49ynczK?p=preview <!doctype html> <html ng-app> <head> <script…
-
3
votes1
answer1168
viewsA: Problems with localhost application with Angularjs and Nodejs
Your server code is working in part because this considering only one type of content ("Content-Type": "text/html"). Try using the code below. Use only Nodejs and some of the module that comes with…
-
0
votes1
answer2869
viewsA: Array filter inside Angular object
You only need to make a simple change to your code: <td> <span ng-repeat="usuario in viagem.viajantes | filter:{nome:filtroViajante}"> {{usuario.nome}} <br /> </span>…
angularjsanswered Denison Luz 271 -
1
votes1
answer234
viewsA: Demand Routing for Controllers
In fact Angularjs already offers it. And Angularjs is already very close to the solution. As Voce is using ui-router, within the ui-router route definition object ($stateProvider) for each Voce…
angularjsanswered Denison Luz 271 -
0
votes2
answers9320
viewsA: How to format the date of an input[date] in the format dd/mm/yyyy'?
Your idea of creating a Directive might work if you use filters. I saw that Voce added the $filter service in your code, but you did not use it. Take a look at the code below:…
-
1
votes2
answers309
viewsA: Why my $Scope. $watch doesn’t work
You need to use the $watch passing by true as the third argument: $scope.$watch('paciente.telefones', function(oldv, newv) { console.log(oldv, newv); var existeCelularComEnvioSms = false;…
angularjsanswered Denison Luz 271 -
1
votes2
answers530
viewsA: Angularjs ng-repeat does not return data, always returns empty
I believe what’s happening is that when the ng-repeat is executed the API data has not yet been returned. Thus Teachers still empty and ng-repeat will show nothing. One way to solve this problem is…
angularjsanswered Denison Luz 271 -
1
votes3
answers2843
viewsA: Controller Angularjs Statement
As far as performance is concerned, there is no difference. But there are some differences that I will list below: What happens when Voce uses the (Directive) ng-controller directive: A new Scope…
-
2
votes1
answer299
viewsA: Gulp insert minified file in index
I believe that what you are searching for is exactly what the plugin Gulp-usemin offers. With the Gulp-usemin Voce can create a building block (build block) inside your index.html with all JS files…
-
1
votes2
answers1019
viewsA: How to make nested directives Angularjs?
@anisanwesley another option would be to inject the $Compile service within Directive and compile the Directive that Voce needs. This way you wouldn’t be depending on any global variable and could…