I have the AngularJS seed project open in Web Storm and an committing it to GIT, again using Web Storm.
When I click Commmit and Push I get 527 warnings.
The AngularJS plugin is installed, how to I exclude the AngularJS library from the commit and get rid of these warnings?
Thanks
Update
CrazyCoder's suggestion to declare AngularJS as a library has removed the warnings associated with that, however the web application is still causing warning to be shown.
For example, the controller has a warning that it is an unused function.
Ignoring files.
Disable Perform Code Analysis in Commit Project dialog.
You can also store this library outside of the project roots and configure it as a JavaScript Library.
Related
I am trying to develop an Outlook addin which will fetch all the attachments from the email chain and perform some actions on them.
I am new to react and outlook add in too.
I want to perform navigation from Home page to other page using react routing.
I have added the appropariate npm packages for React router. (react-router)
When I am trying to navigate fro home page to other page it gives me an error as listed below:
A cross-origin error was thrown. React doesn't have access to the
actual error object in development.
Note: I am using Outlook addin as Yoman office generator, which generates files with .tsx extension.
The same code seems to work on .js file.
Let me know if you require more information for this issue.
Thanks
I am able to resolve it myself, actually missing one typescript definitions for the routing file.
i have installed the dependencies react-router-dom by missed the typescript definitions for it which is as:
npm install #types/react-router-dom --save-dev
Thanks
I want to try my hand at a Cordova based mobile app. In Visual Studio's project templates, under Other Languages->JavaScript, there was an option to install the Cordova templates. I ran that, and after a lengthy install, the JavaScript template folder is gone, and there is a new TypeScript project template node, with one Blank App (Apache Cordova) template.
When I chose that template, I get an error message that says:
The template specified cannot be found. Please check that the full
path is correct
This is giving me the probably wrong impression that in VS2015, support for mobile development has only been given lip service, and there is probably a vast amount of DIY work required to get anything done.
What could be wrong that VS is telling me a template that it just installed is missing? I have a default setup of VS2015 with all default folder settings etc.
I had the same issue after installing update 2 of Cordova. I didn't want to do a 7gb update so I unchecked the Windows 10 related cross platform components as I was only interested in the Cordova update.
To fix the issue I installed all the options back into Visual Studio 2015.
I then received a new error when opening a Cordova Project. I looked in the ActivityLog of Visual Studio "SetSite failed for package [ApacheCordovaToolsPackage]"
To fix this issue I delete the ComponentModelCache of VisualStudio
"C:\Users[your user account]\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache"
I am having trouble including some 3rd party modules in my Angular application, where their inclusion causes the page to render nothing. This is occurring for 2 different modules, and I have tried 2 different angular generators (angular-generator and cg-angular), so it makes me think I am doing something wrong.
Here is an example for the timer directive. I run this command from the application root and confirm the package was installed in the bower_components directory:
bower install angular-timer
I add this line to index.html to source the directive:
<script src="bower_components/angular-timer/dist/angular-timer.min.js"></script>
I inject it into my application in app.js:
angular.module('myapp', ['timer']);
Then when I load the page (grunt serve), the page is completely blank, and the console reports no errors. The network tab of the Chrome developer tools shows that the angular-timer.min.js script is indeed loaded.
It seems straightforward, but clearly something is wrong and I am not sure how to further debug it given that no errors are raised.
The platform is Linux Mint 16 x64 btw.
Any ideas most welcome!
If you are using yeoman basically you should include the modules in your app.js correctly. As I see from your link the directive requires extra modules to run I think since it has requirements sessions. Make sure that you satisfy all the requirements.
I have been messing around with embejs and I have been using default index.html with script tags to render templates on the page, sufice to say my index.html file is littered with:
<script type="text/x-handlebars" data-template-name="aisis">
</script>
That I would like to split up. Now I have worked with ember a little bit in rails applications, but this app doesn't have a back end, doesn't use anything other then javascript and html as its a simple internal app.
My question is, how do I split this up into partials and various other templates and still keep the app nice and small, nice and simple? I have seen a bunch of ember tools out there that generate or scaffold projects for you, but I get lost and confused fast. Where as the way I have been doing it has taught me a lot, it's just my project is massive in one index file...
Ember is designed so that each route should correspond against a template. Whenever you enter a new route, a corresponding template will automatically be rendered unless you override the "renderTemplate" hook.
Try going through the "getting started" guide here: http://emberjs.com/guides/
I would recommend looking at the yeoman suite of tools: http://yeoman.io/
It includes an Ember generator that will scaffold your project, create your bower dependencies, generate a grunt file for builds, etc. Install generator-ember to get started with the scaffolding.
Just create an empty folder, and from there use yo ember to get a complete working app. Take a look at what is generated and you can get some ideas of what to incorporate in your app.
I would check out Ember App Kit. It lets you break up the templates into various files in addition to automatically importing correct modules, linting your code and providing various build options.
Ember App Kit (EAK) is a robust starter kit for developing
applications in Ember.js. EAK makes it easy to develop, build, test,
and deploy applications independent of any back-end build process.
I'm trying to incorporate a Twitter Bootstrap template with Meteor and I'm having trouble understanding how I should include files. For example, let's start with Bootstrap itself, should I install it with Meteor/Meteorite or do it manually with script includes? Same for other javascript plugins (e.g. jquery <- this one is builtin to Meteor right?, lightbox.js.. etc.)
Hope I'm making sense, thanks!
By default meteor already includes jquery.
It's best to look to get your plugins installed via Meteorite. So something like this could get you started
sudo -H npm install -g meteorite
Then in your project directory
mrt add bootstrap-3
For other plugins you can't find on atmosphere add the files into a directory in your project /client/lib. Meteor will automatically reference the files for you, both css and js.
This way they only run on the client side and are loaded first. (such as lightbox.js)
You might have to modify a few files with Meteor, though. In meteor each file's variables are file-scoped. So you can't access them from other files. (meteor basically throws a (function() {..}).call() around the code.
So if you get some kind of issue about a variable being undefined look for the variable and remove the var keyword and remove it so that the variable/method becomes global. With jquery plugins this usually isn't a problem.
Most that have the variable scoping issues are on http://atmosphere.com so you shouldn't run into too many problems.
The most common libraries such as jQuery and Bootstrap (v2.3.0) are provided by the Meteor core (v0.6.6.3). They can be listed using meteor list and included with meteor add.
As referred before, Atmosphere is a collection of unofficial Meteor packages giving an easy way with Meteorite to include even 3rd party solutions to your own project.
Moreover, you should learn the Meteor App structure. Directories created on your project have different preferences in terms of files visibility and loading order. I recommend reading Ritik Malhotra's presentation about the App structure at http://www.slideshare.net/RitikM/building-a-production-ready-meteor-app. There's also a Youtube video about his presentation that can be watched here http://www.youtube.com/watch?v=gfFGjmiKfnA.