SHARE
TWEET

Untitled

a guest Jan 3rd, 2016 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.controller("frontPage", function($sce, $scope, $http, cssInjector, $timeout) {
  2.   $http.get('/drupal/pages/front-page').
  3.     success(function(data, status, headers, config) {
  4.       $scope.page = data[0];
  5.           // Override ngSantize
  6.           if ($scope.page.body[0].value) {
  7.               $sce.trustAsHtml($scope.page.body[0].value);
  8.           }
  9.           //Add home.css to the front page
  10.           cssInjector.add("/css/home.css?v1");
  11.       $http.get('/drupal/blocks/' + $scope.page.nid[0].value).
  12.         success(function(data, status, headers, config) {
  13.           $scope.blobs = data;
  14.           //Override ngSantize
  15.           for (var i = 0; i < $scope.blobs.length; i++) {
  16.                   $sce.trustAsHtml($scope.blobs[i].body);
  17.           }
  18.           $http.get('/drupal/fc/export/json/' + $scope.blobs[4].nid).
  19.               success(function(data, status, headers, config) {
  20.                   $scope.frontMosaic = data;
  21.               })
  22.         })
  23.       $http.get('/drupal/pages/key-points-for-afbs-members').
  24.           success(function(data, status, headers, config){
  25.               $scope.modal = data[0];
  26.           })
  27.       $http.get('/drupal/menu/main/export/json').
  28.           success(function(data, status, headers, config){
  29.               $scope.menu = data['#items'];
  30.               $timeout(function(){
  31.                   $.getScript("/js/common/general.js?v1");
  32.               });
  33.           })
  34.   })
  35.  
  36. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top