Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.factory('scope', function($location, $http) {
- var param = $location.$$path;
- param = param.replace('/','');
- if (param == '') {
- param = 'front-page';
- }
- param = param.replace(/\/(?=\w+)/, '--');
- return $http.get('/drupal/pages/' + param);
- }).
- //////////
- .controller('pageController', function(scope) {
- scope.success(function(data){
- $scope.page = data;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement