This file contains hidden or 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
~/work/cheetah (lifecycle *) $ make serve | |
[default] VM already created. Booting if it's not already running... | |
/opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find i18n-0.6.4 in any of the sources (Bundler::GemNotFound) | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `map!' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb:83:in `materialize' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:113:in `specs' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:158:in `specs_for' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb:147:in `requested_specs' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/environment.rb:23:in `requested_specs' | |
from /opt/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:11:in `setup' |
This file contains hidden or 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
// current (works) | |
<div ng-repeat='movie in movies.titles | subcategories:categoryList()'> | |
// goal: | |
<div ng-repeat='filteredMovies()'> | |
link: function(scope, element, attrs) { | |
scope.filteredMovies = function() { |
This file contains hidden or 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.directive('carousel', function() { | |
var HEIGHT = 321; | |
var SPACING = 12; | |
var template = "\ | |
<div class='carousel-container'>\ | |
<h1 class='carousel-title'>{{movies.carouselTitle}}</h1>\ | |
<div class='carousel'>\ | |
<div class='carousel-slider'>\ |
This file contains hidden or 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.filter('subcategories', function() { | |
return function(movies, categories) { | |
var matching = []; | |
_.each(movies, function(movie) { | |
var missingTags = (_.difference(categories, movie.subcategoryList).length > 0); | |
if (!missingTags) matching.push(movie); | |
}); |
This file contains hidden or 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
$scope.$on('details', function(event, args) { | |
console.log('location.path:', $location.path()); // outputs "/" | |
//document.location.hash = '/details/123'; // works | |
//$location.path('/details/123'); // doesn't work | |
$location.path('details/123'); // doesn't work | |
}); |
This file contains hidden or 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
.on('click', function() { | |
scope.$apply(function() { | |
scope.$emit('details', { url: scope.movie.mobileDetailsLinkUrl }); | |
}); | |
}) |
This file contains hidden or 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
.directive('sdwTopbarLeft', function() { | |
return { | |
restrict: 'EA', | |
require: '^sdwTopbar', | |
transclude: true, | |
template: '<div class="sdw-topbar-left" ng-transclude></div>', | |
link: topbarLeftLink | |
}; | |
function topbarSideLink(scope, element, attrs, controller) { |
This file contains hidden or 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
<html ng-app='testApp'> | |
<body ng-controller='testController'> | |
<button ng-click='test()'>Menu</button> | |
<my-custom-directive id='needToAccess'></my-custom-directive> | |
</body> | |
<script> | |
angular | |
.module('testApp', []) | |
.controller('testController', function($scope) { |
This file contains hidden or 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
angular | |
.module('skookum.mobile.feeditem', []) | |
.directive('sdwFeeditem', function($compile) { | |
return { | |
restrict: 'EA', | |
require: 'sdwFeeditem', | |
controller: feeditemController, | |
link: feeditemLink, | |
replace: true, |
This file contains hidden or 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
angular | |
.module('test.routes', ['ui.state']) | |
.config(function($routeProvider, $stateProvider) { | |
// automatically redirect to #/test | |
$routeProvider | |
.otherwise({ redirectTo: '/test' }); |