I utilized generator-angular to create my project.
I am using HTML5 History. ($locationProvider.html5Mode(true).hashPrefix('!');
For URL rewrite, I am using connect-modrewrite
I followed all the steps outlined in the tutorial.
Below is my GruntFile.js
// Generated on 2013-12-13 using generator-angular 0.6.0
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest;
var modRewrite = require('connect-modrewrite');
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// proxy for backend
grunt.loadNpmTasks('grunt-connect-proxy');
// lib for run rales server
grunt.loadNpmTasks('grunt-exec');
// Define the configuration for all the tasks
grunt.initConfig({
// Project settings
yeoman: {
// configurable paths
app: require('./bower.json').appPath || 'app',
dist: 'dist'
},
// Watches files for changes and runs tasks based on the changed files
watch: {
js: {
files: ['{.tmp,<%= yeoman.app %>}/**/scripts/*.js'],
tasks: ['newer:jshint']
},
jsTest: {
files: ['test/spec/*.js'],
tasks: ['karma']
},
compass: {
...
};
};
I'm facing an issue. When I reload the page in the browser, I receive a "Cannot GET /offers" error message. What did I do wrong?