Can I run Angular-U/UI-Router with Notepad++? - angularjs

Is there some way to run UI-Router without running bower/npm, etc?
https://github.com/angular-ui/ui-router
I tried linking to it (just like to angular), but that didn't work. Tried saving it locally in a .js file and referencing it. That didn't work either. Am I missing something or am I just trying to do something impossible?
edit: Alternatively, is there anywhere to test this? Like plunkr or something?

Here's the source for what I think is the latest. I think you should just be able to link to it in a <script /> tag in your index.html:
http://angular-ui.github.io/ui-router/release/angular-ui-router.js
Or copy that to a text file and run it completely locally, since I think you're just trying to test it out. If it didn't work, maybe make sure you have all of its dependencies, if any.
Of course it looks like it's a package in plunkr, so you should be able to try it there. I added it and the latest angular for you (haven't tested it though):
http://plnkr.co/edit/jdX6pRn6noHh1JoP5CH6?p=catalogue

You can write Angular UI routing code into your Notepad++ editor, But you require a normal web server to run it properly.
You can try the Google Chrome Plugin to execute all AngularJS related codes.
Kindly Run all the applications using a local server. There is no need for Tomcat server. You can easily download a Google Chrome Plugin "Web server for Chrome". here- Web Server for Google Chrome
Also the Angular UI routing Snippet is available at: https://github.com/TheAjinkya/AngularSnippets/tree/master/Angular%20UI-Router

Related

Loading TinyMCE without Cloud in React

I am working on React project that uses TinyMCE as a rich-text editor. I wanted to opt out of their cloud services so as to remove the following message.
This domain is not registered with TinyMCE Cloud. Start a free trial to discover our premium cloud services and pro support.
I tried out this link (Loading TinyMCE by yourself) from the TinyMCE website by adding the following code to my index.html file hoping that it would be accessible globally.
<script src="https://cloud.tinymce.com/5/tinymce.min.js"></script>
This did not work nevertheless. Am I missing something here?
The URL in your script tag is using our Cloud service to try to load the editor so if you don't want to use our Cloud platform, then that URL seems not to be what you want.
If you want to locally host TinyMCE in a React app. You can do so via a module loader as outlined here:
https://www.tiny.cloud/docs/advanced/usage-with-module-loaders/
If you want to use the script tag referenced in your question you need to register on our Cloud platform (it's free) to get an API key. Once you have that, you need to include that API key in your script tag as outlined here:
https://www.tiny.cloud/docs/cloud-deployment-guide/editor-and-features/
...so the script tag would look like this:
<script src="https://cloud.tinymce.com/5/tinymce.min.js?apiKey=your_API_key"></script>
...but with the string your_API_key replaced with your actual API key.
I'v got a new way to get rid of the cloud when using official tinymce react package.
Go to https://github.com/tinymce/tinymce-react, and clone the whole project.
Open the file src/main/ts/components/Editor.tsx, and go to line 122, where you can find the function named 'getScriptSrc'.
Remove all codes inside the function, and just return the url of your self hosted tinymce.min.js. In this way you can get official tinymce react but won't get bothered by the message.
Import Editor in src/main/ts/index.ts.

which eclispe should be downloaded to automate angular js application

Is it possible to automate Angular JS application by using eclipse? If so, which version should I try?
Also, what are the languages I need to know before doing that.
I downloaded Angular JS from Help-->Eclipse Marketplace-->AngularJS
But somehow I feel like I am unable to connect the dots.
Please suggest me on this.
I'm not quite sure what you want to do, but if you have already installed Angular IDE into Eclipse, that's the most you can do from it. It supports projects, syntax and error handling in Ajs. In comment you've mentioned testing angular js application. Like every other website, you can use JUnit or TestNG automatic tests to verify work of your application. If you dont like approach from Eclipse, you can use Selenium IDE test that runs throught Mozilla Firefox.
On picture above you can enable or disable Angular support for your project.

Don't know how to convert an Angular Web App made with nodejs to windows exe

I'm a complete noob at programming with nodejs.
I'm developing an webapp with angularjs with this structure:
So, when I run the command "nw ." with the prompt command my application loads correctly.
All I want now is transform all this structure on an single Windows executable for distribute it for my customers.
I'm looking for any solutions like Bat to Exe, APPJS, and a lot of others. But I do not have any success either.
How can I do this?
You are probably going to need to looking at use a tool like ng-template to build everything into a single package or distributing a basic web server along with your site in order to make things work.
This is mainly due to the issue with the browser not allowing XHR requests from disk as AngularJS runs and request the various html files as your views change.
The best thing is to look using a tool like ng-template to compile all of the html partials into a single .js file that can be loaded from disk along with your AngularJS app. This way AngularJS will load all your partials into the $template cache and won't have to make any XHR calls to load them.
The other possibility is to look at something simple like the Cassini Web server or something similar that you can add to your directory and launch with a simple batch file. I say this because you are talking about distributing something to people who may not have Node.js installed, meaning you probably can't rely on them being able perform a bunch of installs just to get to your app.
How to package and distribute your apps solved my problem!

What files do I need to host an angularJS website

I'm trying to host my first website. I've made it using angularjs, bootstrap and yeoman as a generator. However when I tried to upload it, I realized that the full size of everything in my folder (including the generated stuff by yeoman) was nearly 100mb.
What files do I actually need to host? Node is nearly 60mb and grunt isn't much smaller. Any advice would be greatly appreciated.
Assuming you have a web server like nginx or apache already on that server, you just need to upload the dist folder that is created when you run grunt build.
You don't need all that generator and node stuff just to host a simple test project.
What you actually need is a single HTML file, called index.html. Include Angular and bootstrap (you can omit this, too, if you can go without fancy styles) and create a file app.js which will hold your application logic.
http://angularjs.org shows this in a neat way on their landing page, just scroll down to 'The basics'
As static angularjs application will contain mainly HTML, CSS and JS files you can host your project on simple apache webserver. (Apache - http://httpd.apache.org/)
If you are making a dynamic angularjs application you will have webservices returning you JSON data. If you implement the restful webservices in Java (using Jersey) you can deploy you entire angularjs application with java webserivce implementation to tomcat web server. (Tomcat - http://tomcat.apache.org/)
Hope this helps!
Decided to answer this old question because its one of the few that show on google when searched.
You do not need to use Grunt anymore, I do not know if this was needed at the time of this question.
instead just do
ng build my-app
this would have saved me some hours.
link to current doc

running an AngularJS app in general

I am taking baby steps with AngularJS. I am a bit confused about requiring a webserver to run an AngularJS sample or demo. The reason is for study purpose I have downloaded running examples and demos, but not having any luck with it. A very simple demo of displaying a name is not working for me. Do I have to do anything specific to get a simple app running. I feel very weird asking my doubt requing a webserver as AngularJS is a client side Framework. Nevertheless, hoping someone can throw some light on this.
Thanks in adavnce.
If you use Firefox, then you don't need any server to have your basic app running. If you use Chrome, then for security reasons it doesn't like file-access to librairies. Librairies must be serve in another way. So you can have the hello-world AngularJS working by opening the classic index.html with Firefox, so that you don't have to start any web server.
Here is a sample application with explanations in the README :
https://github.com/davidb583/white-angularjs-app
Actually, you don't need a webserver to run AngularJS application since it is client-side framework.

Resources