Angularjs Ui-scrollpoint issue - angularjs

var app = angular.module('app', ['ui-scrollpoint,'ngRoute','ui.bootstrap','ngSanitize']);
Im working with angularjs .I want to use scrollpoint in my angularjs application .But always im getting error and my module doesnot get loaded.What is the issue with this. Can anyone help me giving the required cdn for ui-scrollpoint?

You can take it directly from the GitHub, where it's repository is hosted:
https://rawgit.com/angular-ui/ui-scrollpoint/master/dist/scrollpoint.js
Also, https://cdn.jsdelivr.net/npm/angular-ui-scrollpoint#2.1.1/dist/scrollpoint.min.js

Related

How to load modules in Angular Electron?

I have a functioning angular electron application which was made using this boilerplate code:
https://github.com/maximegris/angular-electron
I am trying to add the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) to my application and I'm stuck at "loading the module in your application by adding it as a dependent module":
angular.module('app', ['ngSanitize']);
How can I do this in an angular electron application with the current file setup? Thank you!
Like you can read on electron's website it uses Angular v2+ (currently 6.1.2). And you are trying write in AngularJS.
For the beginning here is something about modules: https://angular.io/guide/ngmodules but I would suggest you get familiar with whole tutorial and new version of Angular

Need help bootstrapping an AngularJS app into an Angular2 CLI generated app using ngUpgrade

I've been wrestling with this for almost a day now, so I think it's time I give up and ask for help.
I started with a trivial AngularJS application (1.4.7) that should simply display "Greetings from Angular 1", and have been trying to bootstrap that application into a trivial Angular2 CLI generated app.
It doesn't seem to work. Instead of "Greetings from Angular 1", I see "{{angular1Msg}}". The following commit shows exactly what I did to include and bootstrap the app. I've spent quite a bit of time now with the documentation and am not sure what I'm missing.
Any help would be greatly appreciated!
Project repo:
https://github.com/scottschafer/ng2hybrid
The commit in which I attempted to integrate the AngularJS app:
https://github.com/scottschafer/ng2hybrid/commit/4b2c7c5339388ec2b3debeae0643dff89b75926f
(note that the source for the AngularJS app lives in src/ng1app, and is a working standalone AngularJS 1.4.7 application).
I finally got this working. A lot of trial and error. Not much fun at all.
https://github.com/scottschafer/ng2hybrid

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!

Bower dependencies for Angular in Eclipse

I have a web app I am launching from Eclipse using Spring Boot. I am trying to use Angular modals to have a nice looking confirm delete modal and I was following this tutorial to get the right dependencies. The Bower install seemed to go well:
bower install angular-modal-service --save
And I copy this into my html:
<script src="bower_components\angular-modal-service\dst\angular-modal-service.min.js"></script>
And I add the dependency in my Angular file:
var app = angular.module('myApp', ['angularModalService']);
But that is the point at which it fails. If I launch my app I just get a blank page, nothing at all loads. My console output from Chrome's developer tools gives me:
Uncaught Error: No module: angularModalService
This is a general problem I have had, anytime I try to add a dependency with something like
var app = angular.module('myApp', ['DEPENDENCY']);
it doesn't work. Is there something more I need to do in Eclipse in order for it to get it to pick up on my Bower dependencies?
When you have such problem, we can't resolve it for you.
But we can give you some advices to resolve this kind of problem :
Identify the problem. Open the developper tools of your navigator (F12), then the console. If you have nothing here, try to refresh. Angular will let you know if there is a dependency injection problem.
Check if you didn't forgot something. You have to import in your page angular, THEN angular-modal-service, THEN your application. The order is important.
Check if the module you want to use doesn't depend to something else. In your case, do this module needs bootstrap JS files ? Again, take a look at the console. It's here to help you.
Perhaps not specifying type="text/javascript in the script declaration causes your browser not to parse and execute the script? It is required in HTML < 5. Try adding that. Maybe that will help. Post your HTML file, if it still does not work.

AuthService with AngularJS not work

Hi friends i am new with angular js.
i try to create login and register with angular js.
i used this tutorials for authentication.Click here
i got this error i don't know why i think i forgot to include any authentication js file.
please how to resolve this error.
i think you are using $routeProvider for your angular app. but in your example angular app is using $stateProvider.so you have to install angular-ui-router.js and give reference to it to the index.html .
and also you have to put dependency 'ui.router' in to app.js
Stop the Javascript based authentication and opt for a token based approach using server-side language like PHP coupled with AJAX.

Resources