Thursday, 15 May 2014

javascript - AngularJS - ngRoute - Callback after view-load finished -


I try to apply animation-dialog with AngularJS. So my APP starts and shows a dialogue (all is well), but there are images in the dialog that are outside the viewport (because I exclude them from the viewport with my CSS) and then the dialog It should be animate in opening time when this material has been loaded.

For this I attached a class for the images, so they are out of the viewport. While removing the class, animate in the viewport all well. But

But: After the opening of this dialogue, how can I AngularJS make them live?

For debugging,}} and hyperlinks:

  & lt; Div class = "dialog bg-turkey" id = "mainpage" & gt; & Lt; Img src = "picture / home page-1png" id = "homepages -1" ng-square = "{nook: closed}" & gt; & Lt; Img src = "images / mainpage-2.png" id = "mainpage-2" ng-class = "{first: closed}" & gt; & Lt; Img src = "picture / home page-3. Pgn" id = "main page-3" ng-square = "{unassigned: closed}" & gt; & Lt; Img src = "picture / home page-4pn" Id = "mainpages-4" ng-square = "{unassigned: closed}" & gt; {{Close}} & lt; An NG-Click = 'Chetan ()' & gt; Open & lt; / A & gt; & Lt; / Div & gt;  

Here is the dialog controller:

  var loadingController = ["$ scope", function ($ scope) {$ scope.closed = true; $ Scope.animate = function () {Warning ('Los'); $ Scope.closed = false; }; $ Scope $ ('$ ViewContentLoaded', function () {setTimeout ($ scope.animate, 100);}); }];  

And here's the path:

  app.config (function ($ route provider, $ compiled provider) {$ routeProvider.when ("/", {controller : OpenController, templateUrl: 'views / loading.html'}) Otherwise ({redirectTo: "views / welcome.html"})}}  

Now when you open that dialogue, Elleryt (Debugging purpose) appears, but variable changes do not occur. Just when I click on the hyperlink, the alert appears in variable changes and then the animation starts ..

What do I do?

No comments:

Post a Comment