Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Brinkmann luckyduck

View GitHub Profile
View config.xml
<frontend>
<routers>
<angularlist>
<use>standard</use>
<args>
<module>Luckyduck_Angularlist</module>
<frontName>angularlist</frontName>
</args>
</angularlist>
View ListingController.php
class Luckyduck_Angularlist_ListingController extends Mage_Core_Controller_Front_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
View luckyduck_angularlist.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addJs">
<script>angularlist/angular.min.js</script>
</action>
</reference>
</default>
View config.xml
<?xml version="1.0"?>
<config>
<modules>
<Luckyduck_Angularlist>
<version>0.1.0</version>
</Luckyduck_Angularlist>
</modules>
<global>
<blocks>
View list.phtml
<script type="text/javascript">
var angularlistApp = angular.module('angularlistApp', []);
angularlistApp.controller('ProductListCtrl', function($scope, $http) {
$http.get('<?php echo Mage::getBaseUrl()?>api/rest/products').success(function(data) {
$scope.products = data;
});
});
</script>
<div ng-app="angularlistApp">
View gist:8347368
#include <stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}
View gist:8347377
#include <iostream>
int main()
{
std::cout << "Hello, world!" << std::endl;
return 0;
}
View gist:8347382
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hi!</title>
</head>
<body>
<p>Hello, world!</p>
</body>
</html>
View gist:8347391
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
View gist:8347400
// Ausgabe in der Konsole
console.log('Hello world!');
// Dialog-Fenster
alert('Hello world!');
// im HTML Dokument:
document.write('Hello world');
You can’t perform that action at this time.