yeoman-generator-angular

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

NodeJS controller, Yeoman — ng-repeat returns everything together once, only returns specific entries using dot operator

独自空忆成欢 提交于 2019-12-12 04:32:08
问题 (See below the updates) On this MEAN stack tutorial, a test model is hard-coded to be displayed via ng-repeat on a table. The project was scaffolded using Yeoman, compiles + serves with Grunt and uses Bower. Issue : The following ng-repeat returns a blank row instead of populating it with Field A and Field B : Page <body ng-app="clientApp" class="ng-scope"> <div ng-view class="ng-scope"> <table> <thead> <th>Field A</th> <th>Field B</th> </thead> <tbody> <tr ng-repeat="X in testModel"> <td>{{

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,

Adding grunt-connect-proxy to generator-angular gruntfile.js

孤街醉人 提交于 2019-12-11 09:52:27
问题 I'm trying to add grunt-connect-proxy to my gruntfile.js in a yeoman generator-angular project (generator-angular 0.15.1) but I can't seem to get it to work since the way it's written changes and I'm inexperienced in how Grunt works. I've read many posts about this and none are particularly up-to-date, and the gruntfile changes seemingly often in how it implements livereload middleware This makes the documentation for grunt-connect-proxy to not work in my case. The tricky part is under

ComposeWith in yeoman generator not emitting an end event and thus not driving 'on' method

落爺英雄遲暮 提交于 2019-12-11 04:06:28
问题 Background I am creating a scaffolding generator for an Angular SPA (single page application). It will rely on the environment set up by the standard angular generator ('yo angular'), and also rely on the standard angular subgenerators to generate a few extra services and controllers necessary to the app. In other words, I'm "decorating" a basic angular app. The generator will work fine if the user has previously installed an angular app (I look for marker files and set a booleon

Unable to generate “dist” folder in yeoman angular generated webapp

跟風遠走 提交于 2019-12-11 03:42:45
问题 I am unable to generate dist folder in the web app built and generated using yeoman angular generator. I am pasting the verbose of grunt build. Please check if this is helpful. pdc1-f3t18r1:ShippingSolution administrator$ grunt --verbose build Initializing Command-line options: --verbose Reading "Gruntfile.js" Gruntfile...OK Registering Gruntfile tasks. Registering "grunt-autoprefixer" local Npm module tasks. Reading /Users/administrator/Desktop/CiscoShipping/ShippingSolution/node_modules

Yeoman generator-angular : 'task wiredep' is not in gulpfile & $.useref.restore is not a function

送分小仙女□ 提交于 2019-12-10 15:41:48
问题 I've just started using Yeoman to scaffold a new Angular app. I followed the installation guide at generator-angular but chose to use gulp instead of grunt for the task runner. After installation I received error : task 'wiredep' is not in you gulpfile . I tried running the build using gulp and received error : TypeError: $.useref.restore is not a function If I run gulp serve , the resulting page does not wire dependencies. Is there a fix to the errors above? I noticed that Yeoman uses grunt,

How to change/set the main view using Yeoman with Angular Fullstack

…衆ロ難τιáo~ 提交于 2019-12-08 13:41:40
I created a project using Yeoman (angular-fullstack). And now I would like to know how the change/set the main view to login.html. So normally when you start the application you first get the main view where you can chose to login or register. What I want is when the application start the page starts direct on the login.html in your app.js file located at client\app\app.js , in the angular config add the following: $stateProvider .run(function ($state) { $state.go('login'); }); So it should look like: .config(function ($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) {

UNMET PEER DEPENDENCY generator-karma@>=0.9.0

本小妞迷上赌 提交于 2019-12-07 08:22:11
问题 I am installing version 5.6 of node.js on a CentOS 7 server with generator-angular , and am encountering the following error, in addition to some deprecation warnings: UNMET PEER DEPENDENCY generator-karma@>=0.9.0 I am following instructions from this tutorial. How can I resolve this error so that npm is able to successfully install generator-angular ? Also, are all the deprecation warnings anything to be concerned about? Is there a way to install generator-angular without using deprecated

Building Yeoman app breaks CSS background images

China☆狼群 提交于 2019-12-06 07:51:04
问题 I'm trying to migrate an existing project to Yeoman/Grunt/Bower. After changing the paths inside Gruntfile.js I noticed the image paths aren't built correctly: background:transparent url(/Users/lucian/Projects/[PROJECT]/src/main/resources/com/app/public/portal/.tmp/images/bg.header.png) center top no-repeat scroll; After checking everything thoroughly I went back to the Yeoman AngularJS generated project and checked to see if the same thing happens. So I added to main.css : .marketing {