angular.element.scope() returns undefined after upgrading latest verion angular-ui-bootstrap 1.3.1 - angular-ui-bootstrap

I am upgrading my angularjs, I have upgrade angular-ui-bootstrap 1.3.1 from 0.12.0 with the angularjs version is 1.4.5.
now there is a breakable change I found in my application that angular.element.scope() returns undefined. below is how I try to fetch the scope which was working with older versions
angular.element('#myController').scope()
below is the html code
<div id="myController" ng-controller="userPermissionsController">
the only difference I found in older and newer version is that angular.element('#myController') returns the element with the added css class "ng-scope" which is not added when working with newer version
anybody any idea

This is not an issue with angular-ui-bootstrap, Angular no longer exposes the scope() method on the angular element by default. See the docs here under the jQuery/jqLite extras section where it talks about the scope method. Angular removed that feature to improve performance, so I would caution against continuing to use that approach.

Related

Can React on Rails be integrated into an existing Rails 3.x app?

The prerequisites from the README say "React on Rails supports older versions of Rails back to 3.x" so I was led to believe it could. But then during the install process I see I have to install webpacker. And there's the note "Rails/webpacker requires version 4.2+."
So I'm currently stalled out and wondering if this really does support Rails 3.x or if I misunderstood the documentation.
Is there a way to integrate React on Rails into an existing Rails 3.x app?
Thank you!
According to justin808 on the corresponding GitHub issue for this question:
"React on Rails should not require rails/webpacker.
Just use the asset pipeline."
I guess I misunderstood that rails/webpacker was a hard dependency. Trying again now to get react_on_rails working without it. I'll mark this as the accepted answer, at least for now.

Ember upgrade 1.7 to 1.13.* fails with buildRenderNodes is not a function

I was using ember as a part of my grails application, All libs were provided by a ember grails plugin 1.7. As I would eventually like to move to newer version I have tried both to replace ember and ember-data with newer files versions as well as to add references to hosted files, but I would always get during run:
template.buildRenderNodes is not a function
My guess from that error message would be you are still referencing handlebars rather than htmlbars which Ember now uses. You now need ember-template-compiler.js, see http://emberjs.com/builds/#/release.
As Christopher mentions, you will probably feel less pain by going up a version at a time and also moving to Ember CLI if you haven't already

Upgrading Rails app from 3.2.6 to 3.2.18

I have a Rails app that was built on 3.2.6. I want to upgrade it to the latest version of 3.2 (which seems to be 3.2.18). Can anyone tell me what changes will need to be made besides just changing the Rails version number in the Gemfile? Is there a more stable version I should be upgrading to instead of 3.2.18? I am extremely new to Rails development and I am not finding much help elsewhere on the web.
EDIT: I tried updating to 3.2.18 briefly just to see if the behavior of my application changed, and once I had done so, the main page would not even load, claiming the template was missing. This seems to indicate that I need to manually go in and fix something.
Rails uses semantic versioning. This means that 3.2.x will work if the application was working in any version of 3.2.x.
The latest stable version of Rails is 4.1. I would recommend building new applications with the latest version, unless you know for certain a required feature was deprecated.
EDIT: This response on rails core describes the versioning https://github.com/rails/rails/issues/9979
X.Y.Z
Z - only bug fixes, no API changes.
Y - new features, may contains API changes.
X - new features, will contains API changes. Just bumped in special occasions
change the rails version in Gemfile and run 'bundle update rails'

What is the backport of Rails 3 style finders (.where) to Rails 2?

I know I've heard of a library that provides Rails 3 style finders (.where) to earlier versions of Rails, but web search is failing me.
I've got a 2.3 project that needs a new feature, and I'd rather use the newer style in case it gets upgraded.
Would something like the Fake_arel gem help?
Fake_arel simulates and supports a variety of features from Rails 3 for earlier Rails versions. The only major requirement is that your currently-used ActiveRecord gem needs to be greater than or equal to version 2.3.5.
The documentation also notes that Fake_arel can be used as a bridge between Rails 2 and Rails 3 apps, which could ease future transitions to later Rails versions.

Is there an update of Jcoverflip Jquery plugin to fix compatibility with jquery-ui-1.8.+.js?

With jquery-ui-1.7.x.js version works fine, but with newer version 1.8.x it gives me error
Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'widget'
From what I saw in jquery ui downloads before 1.8 version there is no option to download "Widget" but in 1.8 you have a selection to download core and widget seperately. There is I believe the problem.
The author has developped a more compatible version of JCoverFlip with jQuery UI 1.8 at https://github.com/NewSignature/jcoverflip.
It works for me!
Same problem, SlidingGallery would be an alternative.
Try the jquery 1.3.2 version and it works fine!

Resources