Skip to content

Instantly share code, notes, and snippets.

View spiegela's full-sized avatar

Aaron Spiegel spiegela

  • Stealth Data Analytics Company
  • Kansas City, MO
  • X @spiegela
View GitHub Profile
{
"name": "erlang-build",
"main": "./lib/erlang-build",
"version": "0.0.0",
"description": "A short description of your package",
"activationEvents": ["erlang-build:toggle-messages"],
"repository": "https://github.com/atom/erlang-build",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
{WorkspaceView} = require 'atom'
path = require 'path'
ErlangBuild = require '../lib/erlang-build'
# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs.
#
# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit`
# or `fdescribe`). Remove the `f` to unfocus the block.
describe "ErlangBuild", ->
@spiegela
spiegela / navigation.js
Created May 27, 2014 23:25
Navigation Controller Step 3
// in app/controllers/navigation.js
var NavigationController = Ember.ArrayController.extend({
content: Ember.A([
Ember.Object.create({title: "About", location: 'about', active: null}),
Ember.Object.create({title: "Projects", location: 'projects', active: null})
]),
title: "Almighty Machine"
});
export default NavigationController;
{
"name": "almighty",
"dependencies": {
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"qunit": "~1.12.0",
"ember-qunit": "~0.1.5",
"ember": "1.5.1",
"ember-data": "1.0.0-beta.7",
"ember-resolver": "stefanpenner/ember-jj-abrams-resolver#master",
@import 'vendor/foundation/scss/foundation.scss';
{{! location: app/templates/navigation.js }}
<ul class="title-area">
<li class="name">
<h1> {{link-to title 'application'}}</h1>
</li>
</ul>
<section class="top-bar-section">
<ul class="left">
{{#each}}
{{#list-link}}
//location: app/views/navigation.js
var NavigationView = Ember.View.extend({
tagName: 'nav',
classNames: ['top-bar'],
templateName: 'navigation'
});
export default NavigationView;
{{! location: app/templates/application.hbs }}
{{render 'navigation'}}
<h2 id="title">Welcome to the Almighty Machine</h2>
{{outlet}}
var NavigationController = Ember.ArrayController.extend({
content: Ember.A([
Ember.Object.create({title: "About", location: 'about', active: null}),
Ember.Object.create({title: "Projects", location: 'projects', active: null})
]),
title: "Almighty Machine",
activeLink: null,
activeLinkObserver: function() {
var activeLink = this.get('activeLink');
var content = this.get('model');
export default Ember.Route.extend({
activate: function() {
this.controllerFor('navigation').set('activeLink', 'projects');
},
model: function() {
return this.store.find('project');
}
});