This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
| $scope.$on('authLoaded', function() { | |
| $scope.isExpert($scope.main.serieId); | |
| $scope.isMember($scope.main.serieId); | |
| }); | |
| $scope.loadAuth = function() { | |
| Auth.load().success(function(data) { | |
| $scope.main.user = data.user; | |
| $scope.$broadcast("authLoaded"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html ng-app="RSSFeedApp"> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
| <title>AngularJS Feed Reader - jsFiddle demo</title> | |
| <script type='text/javascript' src="//code.jquery.com/jquery-1.9.1.min.js"></script> | |
| <script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js'></script> | |
| <script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script> | |
| <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css"> | |
| <link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-responsive.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $scope.safeApply = function(fn) { | |
| var phase = this.$root.$$phase; | |
| if(phase == '$apply' || phase == '$digest') | |
| this.$eval(fn); | |
| else | |
| this.$apply(fn); | |
| }; | |
| // OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //This is how HTML, Controller & Directive looked in my actual app at this point. | |
| //Notice that we are applying masonry for every element as they are added by ng-repeat. | |
| //HTML | |
| /* | |
| <div id="photoContainer" style="position:relative;height:800px;zoom:1;"> | |
| <div class="photo" ng-repeat="photoPost in photoPosts"> | |
| <img ng-src="{{photoPost.photo.url}}" add-masonry="photoPost"></div> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add this before your MODX Friendly URLs RewriteCond's and RewriteRule... | |
| RewriteCond /abs/path/to/docroot/statcache%{REQUEST_URI} -f | |
| RewriteRule ^(.*)$ /statcache/$1 [L,QSA] |