In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| // Extend from this for a user to get a notification for unsaved model changes | |
| // and rollback the model if they choose to navigate away. | |
| Ember.DSModelRoute = Ember.Route.extend({ | |
| deactivate: function() { | |
| var model = this.get('controller.model'); | |
| model.rollback(); | |
| if (model.get('isNew')) { | |
| model.deleteRecord(); | |
| } | |
| }, |
| # place in [app]/public so it gets compiled into the dist folder | |
| Options FollowSymLinks | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] |
| <?php | |
| namespace Acme\Context; | |
| use Acme\MyApp\User; | |
| use Behat\MinkExtension\Context\RawMinkContext; | |
| use Behat\Symfony2Extension\Context\KernelAwareInterface; | |
| use Doctrine\ORM\EntityManager; | |
| use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken; | |
| use Symfony\Component\HttpKernel\KernelInterface; |