
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
angular-ujs
Advanced tools
Distributed via
Unobtrusive scripting for AngularJS ( without jQuery dependency )
LiveScript is a compile-to-js language, which provides us more robust way to write JavaScript.
It also has great readibility and lots of syntax sugar just like you're writting python/ruby.
Unobtrusive scripting in jquery_ujs
provides the same interface with angular directives
.
We use the similarity between them and provides seamless intergration with jquery_ujs
.
We use krama
to run unit test against angular-ujs.spec.ls and use protractor
to run intergration test via angular-ujs.scenario.ls.
We follow DRY and has one dependency only on angularjs
.
However, we recommend you add ng-rails-csrf
into your project. As it name suggests, ng-rails-csrf
automatically resolves CSRF in angularjs
environment without jquery_ujs
.
ng-rails-csrf.js
.angular-ujs.js
OR angular-ujs.min.js
.Then include them through script tag in your HTML.
Add this line to your application's Gemfile:
gem 'ng-rails-csrf' # Optional
gem 'angular-ujs'
And then execute:
$ bundle
Then add these lines to the top of your app/assets/javascripts/application.js
file:
//= require angular
//= require ng-rails-csrf (Optional)
//= require angular-ujs
And include in your angular
module definition:
/* 'angular.ujs' DO NOT depend on 'ng-rails-csrf' module.
* You need to include it yourself.
*/
var module = angular.module('my-awesome-project', ['angular.ujs']).
<form data-confirm="Are you sure you want to submit?">...</form>
<a href="..." data-method="delete" rel="nofollow">Delete this entry</a>
** Notice : API changed **
For angularjs
apps, ONLY those items with ng-model
will be submitted with data-remote
<form data-remote="true" action="...">
<input type="text" name="name" ng-model="name">
</form>
data-remote
:<form data-remote="user" action="...">
<input type="text" name="name" ng-model="user.name">
<input type="email" name="email" ng-model="user.email">
</form>
<a href="..." data-method="delete" data-remote="true" data-confirm="Are you sure you want to delete?" rel="nofollow">Delete this entry</a>
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)0.4.8 (2014-02-11)
<a name="0.4.7"></a>
FAQs
Unobtrusive scripting for AngularJS ( without jQuery dependency )
The npm package angular-ujs receives a total of 9 weekly downloads. As such, angular-ujs popularity was classified as not popular.
We found that angular-ujs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.