This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FbswitBlog\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use FbswitBlog\Service\Category as CategoryService; | |
class FbswitBlogService extends AbstractPlugin | |
{ | |
protected $categoryService; | |
public function getCategoryService() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//app.php | |
'providers' => array('Cartalyst\Sentry\SentryServiceProvider'), | |
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I've made like | |
namespace FbswitBlog\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use FbswitBlog\Service\Category as CategoryService; | |
use FbswitBlog\Service\ContentNodes as ContentNodesService; | |
use FbswitBlog\Service\Page as PageService; | |
class FbswitBlogService extends AbstractPlugin | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$recipes = array( | |
array( | |
'id'=> 1, | |
'title'=>'Cookies1', | |
'description'=>'Delicious1, crisp on the outside, chewy 1', | |
'ingredients'=> array( | |
'amount'=> '1', | |
'amountUnits'=> 'packet', | |
'ingredientName'=> 'Chips Ahoy' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//services.js | |
services.factory('RecipeLoader',function(Recipe, $route, $q) { | |
return function() { | |
var delay = $q.defer(); | |
Recipe.query({id: $route.current.params.recipeId}, function(recipe) { | |
delay.resolve(recipe); | |
}, function() { | |
delay.reject('Unable to fetch recipe ' + $route.current.params.recipeId); | |
}); | |
return delay.promise; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.factory('RecipeLoader',function(Recipe, $q) { | |
return function() { | |
var delay = $q.defer(); | |
Recipe.query({id: 1}, function(recipe) { | |
delay.resolve(recipe); | |
}, function() { | |
delay.reject('Unable to fetch recipe ' + 1); | |
}); | |
return delay.promise; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module( 'app', [] ); | |
var MyFunc = function() { | |
this.name = "default name"; | |
this.$get = function() { | |
this.name = "new name" | |
return "Hello from MyFunc.$get(). this.name = " + this.name; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../lib/angular.d.ts"/> | |
/// <reference path="../lib/angular-resource.d.ts"/> | |
class MyApp{ | |
public app:AngularModule; | |
constructor(){ | |
this.app = angular.module('myApp', ['ngResource']); | |
this.app.config(($routeProvider:ng.RouteProvider) => { | |
$routeProvider. | |
when('/', { | |
templateUrl: './view.html', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AngularJS Fb Test</title> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<h1>index.html test get rid of me</h1> | |
<div data-ng-app="app"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt test | |
Running "clean:server" (clean) task | |
Cleaning .tmp...OK | |
Running "concurrent:test" (concurrent) task | |
Running "copy:styles" (copy) task | |
Copied 2 files | |
Done, without errors. |