datepicker issue while integrating using bower - angularjs

I am trying to integrate datepicker : https://github.com/g00fy-/angular-datepicker
I get following error:
Unable to find a suitable version for angular, please choose one:
1) angular#1.2.14 which resolved to 1.2.14 and is required by angular-datepicker#1.0.14
2) angular#^1.3.0 which resolved to 1.4.5 and is required by h4h
3) angular#>=1.2.0 <1.5.0 which resolved to 1.4.5 and is required by angular-moment#0.10.3
4) angular#~1.4.x which resolved to 1.4.5 and is required by angular-modal-service#0.6.7
5) angular#1.4.5 which resolved to 1.4.5 and is required by angular-animate#1.4.5
Can you please suggest me what am I missing here ? Thanks in advance.

angular-datepicker#1.0.14 claims it depends on angular#1.2.14. However in your project, you are using angular#1.4.5.
you can try using angular#1.4.5 with datepicker 1.0.14 to see if the component is still working. If not, either downgrade your angular version (includes the other angular components, e.g. angular-animate) or try to fix the compatibility issue of datepicker to make it work on angular#1.4.5.

Related

Accordion component in AEM throwing error while building the project

Recently I was using the out of box accordion component in my AEM project (6.5). The component is working fine in author and publish mode. But when I'm trying to build the project using Maven, I'm getting the below error.
**${item.name in accordion.expandedItems}: extraneous input 'in' expecting {'}','.','&&','||','[','#'}**
There are no other detailed information regarding the error. What am I doing wrong here?
Thanks in advance.
You might reference an older version of HTL/Sightly in your pom.xml that has no support for in relational operator (which was added in version 1.4 of the spec).

How to use angular-notify module in anguler 1.4.8

We are using angular 1.4.8 and i want to use angular-notifier module in our application. I didn't found any valid examples that explain me how to use it.
According to this I am not sure if i use latest version than it will work or not.
Any help?
Thanks!

Angular Material Calendar incompatibility?

I'm trying to use this cool little angular module:
https://angular-material-calendar.bradb.net/
When doing bower install I get:
Unable to find a suitable version for angular-material, please choose one by typing one of the numbers below:
1) angular-material#~0.11 which resolved to 0.11.4 and is required by material-calendar#0.2.14
2) angular-material#^1.0.9 which resolved to 1.0.9 and is required by public
It looks like this thing was developed in beta, and I can't get it to work with 1.0.9. Does anyone know any workarounds? This module is exactly what I'm looking for.
Thanks!
Use --force-latest or add component version to resoltions key in bower.json
Note
For more info you could check the issue here. I hope this helped.

Unable to find a suitable version for angular installing UI-GRID

I'm installing ui-grid via bower but I get the following error. What is it? What I have to do? What I have to answer in terminal?
Unable to find a suitable version for angular, please choose one:
1) angular#>=1 <1.3.0 which resolved to 1.2.29 and is required by angular-bootstrap#0.12.1
2) angular#1.3.20 which resolved to 1.3.20 and is required by angular-animate#1.3.20, angular-mocks#1.3.20, angular-resource#1.3.20
3) angular#~1.3.8 which resolved to 1.3.20 and is required by angular-dashboard-seed
4) angular#>=1.2.16 1.4.x which resolved to 1.4.10 and is required by angular-ui-grid#3.1.1
5) angular#^1.0.8 which resolved to 1.5.5 and is required by angular-ui-router#0.2.18
6) angular#* which resolved to 1.5.5 and is required by angular-toastr#1.0.2
Prefix the choice with ! to persist it to bower.json
It's not an error. This is to allow the user to select which version of angular to include in the project. Go with #4 it's recommended for your version of ui-grid.

Use AngularJS (Angular1) module from Angular2 project

Just started a demo Angular2 project (no previous experience with Angular1/AngularJS. Have followed and extended from the online quickstart and tutorials, and all was fine. However I'm at the point where I would like to use some components from a library which is designed for AngularJS, and having no end of problems!
Most of the information available about AngularJS/Angular2 compatibility assumes that you have an AngularJS project that you're adding Angular2 components to - not the other way around - so what I'm hoping to do may not even be possible. What I've tried so far involves a simple stripped-back project based on the Angular2 quickstart, with a single Angular2 component that loads into the index.html. I'd then like to integrate components from the existing library (AngularJS-based) into this.
I've tried using UpgradeAdapter.upgradeNg1Component to create components from the library and add them directly into my Angular2 component
I've tried installing angularjs through npm, importing it in a script tag into my index.html and then using a combination of UpgradeAdapter.downgradeNg2Component and UpgradeAdapter.bootstrap to load my Angular2 as a downgraded module
Neither of these seem to work - the component fails to show, and the browser console tells me I've got an Uncaught SyntaxError: Unexpected token <
Evaluating http://localhost:3000/angular2/upgrade
Error loading http://localhost:3000/app/main.js
My best guess at the moment is that this is actually an unsupported scenario, and I need to have a 'proper' AngularJS app in order to use the UpgradeAdapter functionality from Angular2. Can anyone confirm this? Or is there something stupid I'm missing here?
Here is a working plunkr describing how to mix Angular1 and Angular2 elements:
http://plnkr.co/edit/yMjghOFhFWuY8G1fVIEg?p=preview
An important point is to bootstrap your main component on the UpgradeAdapter. This way all elements are available in providers (services / factories) and in directives (components / directives):
upgrade.bootstrap(document.body, ['heroApp']);
These two answers could help you:
angular 1.x and angular2 together
How to inject upgraded Angular 1 service/factory to Angular 2 component in ES5?
So the major problem in this case turned out to be the fact that it appears that the upgrade components aren't included as part of the basic angular 2 bundle. After adding:
<script src="node_modules/angular2/bundles/upgrade.min.js"></script>
to my index.html file the error I was seeing disappeared.
Thanks to the answer here for pointing me in the right direction!

Resources