In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",| https://github.com/50an6xy06r6n/ergogen/blob/master/src/footprints/promicro_rev_routed.js | |
| https://github.com/50an6xy06r6n/ergogen/blob/master/src/footprints/trrs_rev.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/airwire.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/b3u1000p.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/bat.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/frankendiode.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/offsetfrankendiode.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/pcm12.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/promicro_pretty.js | |
| https://github.com/AndrewCloete/ergogen/blob/master/src/footprints/thru.js |
| #!/bin/bash | |
| # | |
| # The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext | |
| # which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just | |
| # from time to time | |
| # | |
| # Usage: ./checkpoint.sh | |
| # | |
| # The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up. | |
| # Or, make an Automator action and paste the script. |
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
| require 'execjs' | |
| class HandlebarsFilter < Filter | |
| class << self | |
| def contents | |
| @@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n") | |
| end | |
| def context | |
| @@context ||= ExecJS.compile(contents) |
| # before this file is loaded, a locale should be set: | |
| # | |
| # In a browser environment, you can use: | |
| # ```<script>__locale='en';</script>``` | |
| # | |
| # In a server environment (specifically node.js): | |
| # ```global.__locale = 'en';``` | |
| # normalize in-app locale string to "en" or "de-AT" | |
| parts = @__locale.split('-') |