You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DHH's Turbolinks allows for programatic Turbolinks.visit(url).
Angular-turbolinks should also expose it's .visit() method in something like maybe a service I believe (ng noob).
For example I have a modal I load with forms.
Forms submit via rails-ujs data-remote=true.
On ajax:success I'd like to refresh via Turbolinks (angular-turbolinks), having the new page ng-compiled.
app.directive'cyModalAjaxForm', ($compile, $rootScope, $location) ->link: (scope, element, attrs) ->element.on'ajax:success', (event, data) ->$modal=element.closest('.modal')
$modal.modal('hide')
Turbolinks.visit($location.url()) # <- my page won't be $compiled :(# $ngTurbolinks.visit($location.url()) <- this is what I needelement.on'ajax:error', (event, data) ->compiled=$compile(data)($rootScope);
$modal=element.closest('.modal')
$modal.html(compiled)
The text was updated successfully, but these errors were encountered:
clyfe
added a commit
to clyfe/angular-turbolinks
that referenced
this issue
Oct 6, 2014
DHH's Turbolinks allows for programatic
Turbolinks.visit(url)
.Angular-turbolinks should also expose it's .visit() method in something like maybe a service I believe (ng noob).
For example I have a modal I load with forms.
Forms submit via rails-ujs
data-remote=true
.On
ajax:success
I'd like to refresh via Turbolinks (angular-turbolinks), having the new page ng-compiled.The text was updated successfully, but these errors were encountered: