Skip to content

Instantly share code, notes, and snippets.

@atamanroman
Last active February 16, 2017 17:22
Show Gist options
  • Save atamanroman/9558386 to your computer and use it in GitHub Desktop.
Save atamanroman/9558386 to your computer and use it in GitHub Desktop.
Examples around ember.js {{link-to}} and its active state
App.Router.map(function() {
this.resource('directory', function() {
this.resource('posts');
this.resource('post', { path: '/posts/:post_id' });
});
});
{{link-to 'posts' currentWhen='directory'}}
App.Router.map(function() {
this.resource('posts');
this.resource('post', { path: '/post/:post_id' });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment