// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('[[~19]]')
.then(function(res){
$scope.message = res.data;
});
});
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('http://designfromwithin.com/assets/templates/gulp_h5bp/package.json')
.then(function(res){
$scope.message = res.data;
});
});
// create the module and name it DESIGNfromWITHIN
var DESIGNfromWITHIN = angular.module('DESIGNfromWITHIN', ['ngRoute', 'ngAnimate']);
// configure our routes
DESIGNfromWITHIN.config(function($locationProvider, $routeProvider) {
// use the HTML5 History API
$locationProvider
.html5Mode(true);
$routeProvider
// route for the home page
.when('/', {
templateUrl : 'assets/templates/gulp_h5bp/pages/home.html',
controller : 'mainController'
})
// route for the blog page
.when('/blog.html', {
templateUrl : '[[~2]]',
controller : 'blogController'
})
// route for the blog post page
.when('/blog-webdesign-development/2013/04/02/foundation-4-template-for-modx-revolution/', {
templateUrl : '[[~18]]',
controller : 'blogController'
})
// route for the contact page
.when('/contact.html', {
templateUrl : '[[~18]]',
controller : 'contactController'
})
.otherwise({
redirectTo: '/'
});
});
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('http://designfromwithin.com/test-content.json')
.then(function(res){
$scope.message = res.data;
});
});
DESIGNfromWITHIN.controller('blogController', function($scope) {
$scope.message = 'Look! I am an blog overview page.';
});
DESIGNfromWITHIN.controller('contactController', function($scope) {
$scope.message = 'Contact us! JK. This is just a demo.';
});
{
"title":"[[*pagetitle]]",
"content":"[[*content]]"
}
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('[[~19]]')
.then(function(res){
$scope.message = res.data;
});
});
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('[[++site_url]][[~19]]')
.then(function(res){
$scope.message = res.data;
});
});
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('http://designfromwithin.com/test-content.json')
.then(function(res){
$scope.message = res.data;
});
});
// create the controller and inject Angular's $scope
DESIGNfromWITHIN.controller('mainController', function($scope, $http) {
$http.get('http://designfromwithin.com/assets/templates/gulp_h5bp/package.json')
.then(function(res){
$scope.message = res.data;
});
});
$array = array(
'title' => $resource->get('pagetitle'),
'content' => $resource->get('content')
);
return $modx->toJSON($array);
snippet = 'tags2json'
<?php
$code = explode(',', $input);
return $modx->toJSON($code);
<?php snippet = 'html2json' $output = json_encode($input); return $output;
{
"id": [[+id]],
"title": [[+pagetitle:html2json]],
"alias": "[[+alias]]",
"tags" : [[+blog_tags:tags2json]],
"content": [[+content:html2json]]
}