$ git clone https://github.com/dbhurley/framework-app.git
$ composer install
JFactory::getApplication();
JFactory::getDbo();
JFactory::getUser();
$model = new UserModel($this->getApplication(),
$this->getInput(), $this->getContainer()->get('db'));
$object = new stdClass(); // error
$object = new \stdClass();
GET /calculators/
< 200
< Content-Type: application/json
{
"calcs": [
{
"id": 49,
"name": "Body Mass Index",
"slug": "body-mass-index",
"url": "/calculator/body-mass-index",
"description": "Calculate the best weight for you."
},{
"id": 48,
"name": "Cubic calculator",
"slug": "body-mass-index",
"url": "/calculator/body-mass-index",
"description": "Calculate one number ^ 2."
}
]
}
<div ng-app>
<h1>Hello {{sometext}}</h1>
<input ng-model="sometext">
</div>
<div data-slider data-field-id="{{field.id}}"></div>
<div slider field-id="{{field.id}}"></div>
<slider field-id="{{field.id}}" />
var calculoid = angular.module('calculoid', [
'ngRoute',
'calculoidControllers',
'calculoidServices'
]);
calculoid.config(['$routeProvider', '$httpProvider', function($routeProvider, $httpProvider) {
$httpProvider.defaults.useXDomain = true;
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
$httpProvider.defaults.withCredentials = true;
$routeProvider.
when('/calculators', {
templateUrl: 'partials/calc-list.html',
controller: 'CalcListCtrl'
}).
when('/calculator/:slug', {
templateUrl: 'partials/calc-detail.html',
controller: 'CalcDetailCtrl'
}).
when('/calculator/config/:slug', {
templateUrl: 'partials/calc-config.html',
controller: 'CalcDetailCtrl'
}).
when('/new', {
templateUrl: 'partials/calc-config.html',
controller: 'CalcDetailCtrl'
}).
when('/calculator/', {
templateUrl: 'partials/calc-detail.html',
controller: 'CalcDetailCtrl'
}).
otherwise({
redirectTo: '/calculators'
});
}]);