yeoman

yeoman webapp with grunt-connect-proxy not working

落爺英雄遲暮 提交于 2019-12-12 08:38:35
问题 I have installed the yeoman webapp generator and I am trying to set up a proxy to another server. I installed the proxy with the following. npm install grunt-connect-proxy --save-dev When I run grunt server, it shows Running "configureProxies" task Proxy created for: /people to localhost:3000 It then directs me to a page running on localhost:9000 which says "Cannot GET /" There is a server running at localhost:3000 and I have tried other domains with no succes. Here is my Gruntfile.js //

Permission denied while installing Yo

孤街醉人 提交于 2019-12-12 07:51:18
问题 I'm trying to set up yo to use the angular generator for a project. I am following the steps detailled here: http://yeoman.io/learning/index.html I already have Node.js and NPM installed. But when I use the command: sudo npm install -g yo bower grunt-cli It fails and I get this error: > spawn-sync@1.0.11 postinstall /usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync > node postinstall fs.js:439 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

Rename a newly-created directory using Yeoman (mem-fs-editor)

家住魔仙堡 提交于 2019-12-12 05:33:00
问题 I'm trying to rename a folder in the destination directory. The directory structure inside my templates folder looks like this: root/ ├── generators │ └── app │ ├── templates │ │ └── app │ │ └── widget │ │ ├── widget.controller.ts │ │ ├── widget.service.ts │ │ └── widget.module.ts │ └── index.js └── .yo-rc.json I'm trying to rename the widget directory (in destinationPath ) to a name that the user enters during the prompting stage. Here's how I'm attempting this: module.exports = generators

“Uncaught Reference Error: Polymer is not defined” caused by IP-change?

一笑奈何 提交于 2019-12-12 04:39:19
问题 so I didn't touch my current project for almost one month and after that, nothing is running anymore and I get the message Uncaught Reference Error: Polymer is not defined for each of my Polymer-Elements and this one once: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/tools/loader/loader.js Uncaught ReferenceError: PolymerLoader is not defined I have Polymer included in my main html-file like this: <script src="bower

Jquery scripts in angularjs project

两盒软妹~` 提交于 2019-12-12 04:36:17
问题 I am working on angularjs project that I generated using yeoman angular generator. I have a jQuery function that I need to use in most of my html views. A possible solution is to add this function to a script.js file for example, and add this file as reference in the html views that require this function. However, I don't think this solution is good. When yeoman generates an angularjs project, in its index.html file, it adds a section <!-- build:js({.tmp,app}) scripts/scripts.js --> within

Running tests with localStorage

狂风中的少年 提交于 2019-12-12 03:48:34
问题 i have followed this tutorial from Codelab and yeoman. When implemented right you are using local storage to store the TodoList. I have problems with setting up with my tests, to test if this works. This is what i've got so far: 'use strict'; describe('Controller: MainCtrl', function () { // load the controller's module beforeEach(module('yeoTodoApp'), module('LocalStorageModule')); var MainCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller,

npm install command doing nothing

一个人想着一个人 提交于 2019-12-12 03:03:50
问题 I have a package.json with the following contents: { "name": "useless-app", "version": "1.0.0", "dependencies": {}, "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-copy": "~0.4.0", "grunt-contrib-concat": "~0.2.0", "grunt-contrib-coffee": "~0.6.6", "grunt-contrib-jst": "~0.5.0", "grunt-contrib-uglify": "~0.2.0", "grunt-contrib-compass": "~0.2.0", "grunt-contrib-jshint": "~0.4.3", "grunt-contrib-cssmin": "~0.6.0", "grunt-contrib-connect": "0.3.0", "grunt-contrib-clean": "0.4.0", "grunt

IdleProvider.windowInterrupt is not a function

感情迁移 提交于 2019-12-12 03:01:43
问题 I am trying to get the most basic possible implementation of ng-Idle working in node.js on my devbox. Towards this end, I have taken the minimal sample shown at this link, and have installed it in what was a working minimal installation of node.js , which I implemented using the instructions which I have documented at a file sharing site at this link. All I did to the working minimal node.js app was to go into a minimalist working app, 1.) Tyoe bower install ng-idle in the root folder of the

Getting 404 error while connecting to signalr using Angularjs

三世轮回 提交于 2019-12-12 01:54:25
问题 Hi All i'm working on Implementing a SignalR Stock Ticker Using AngularJS based on an example over here. But i'm getting an error while connecting to signalr like this GET http://localhost:9000/signalr/negotiate?clientProtocol=1.5&connectionData=%5B%7B%22name%22%3A%22stockticker%22%7D%5D&_=1480526019939 404 (Not Found) And this is where the error is showing in my jquery file: try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); }

Unable to reset a $scope variable with angularjs

别等时光非礼了梦想. 提交于 2019-12-12 01:27:53
问题 I have a factory that is injected into all of my controllers to initialize and store the state. state.js angular.module('c2gyoApp') .factory('state', function() { var now = new moment().startOf('hour'); return { rental: { tab: 'simple', startDate: now.clone().add(1, 'h'), endDate: now.clone().add(10, 'h'), distance: 10, timeMinutes: 0, timeHours: 10, timeDays: 0, timeWeeks: 0, timeStanding: 0, airport: false } }; }); The start of every controller looks like this c2gdtp.js angular.module(