Angular html5mode不允许直接转到URL

时间:2017-03-30 17:40:32

标签: angularjs iis

在我的Angular v1应用中,我启用了html5mode。我还修正了“404错误”#39;通过应用从此处https://coderwall.com/p/mycbiq/deep-linking-angularjs-on-windows-azure-iis

获取的配置刷新页面

但还有另一个问题

我有2页/路线

domain.com/signin
domain.com/reset

domain.com/signin是主页。在该页面上有一个锚点<a>,我可以通过domain.com/reset转到domain.com/reset。但是,当我尝试在浏览器的地址栏中打开domain.com/signin时,我被重定向回domain.com/reset页面。如何设置app / IIS配置以允许我打开$stateProvider.state('common', { url: '/', data: { restricted : false }, views: { "main": { controller: 'homeController', controllerAs: 'vm', templateUrl: 'app/home/home.html' }, } }) .state("login", { parent: 'common', url: 'signin', controller: 'loginController', controllerAs: 'vm', templateUrl: 'app/login/login.html' }) .state("passwordResetStep1", { parent: 'common', url: 'reset/:id', controller: 'loginController', controllerAs: 'vm', templateUrl: 'app/login/login.html' })

陈述定义:

import ddf.minim.*;
import ddf.minim.analysis.*;
import javax.swing.JFileChooser;
import processing.pdf.*;
PImage mouseCursor;
Minim         minim;
AudioPlayer   player;
AudioMetaData meta;
BeatDetect    beat;
FFT           fft;
int           w;
float         rad = 70;
int           r   = 2000;

void setup() {
  beginRecord(PDF, "/Users/Luke/Desktop/Processing Projects and     Files/f.pdf");
  fullScreen();  
  JFileChooser chooser = new JFileChooser();
  chooser.setMultiSelectionEnabled(true);
  chooser.setFileFilter(chooser.getAcceptAllFileFilter());
  //chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
  int returnVal = chooser.showOpenDialog(null);
  minim = new Minim(this);
  player =                 minim.loadFile(chooser.getSelectedFile().getAbsolutePath());
  meta = player.getMetaData();
  beat = new BeatDetect();
  player.loop();
  //player.isLooping();
  fft = new FFT(player.bufferSize(), player.sampleRate());
  fft.logAverages(60, 7);
  noStroke();
  w = width/fft.avgSize();
  background(0);
}
void draw() {
  noCursor();
  background(0);
  fill(255);
  fft.forward(player.mix);
  //stroke(255);
  stroke(random(255), random(255), random(255));
  for (int i = 0; i < fft.avgSize(); i++) {
    line((i * w) + (w / 2), height, (i * w) + (w / 2), height -                     fft.getAvg(i) * 4);
    strokeWeight(20);
  }
  beat.detect(player.mix);
  fill(0, 20);
  noStroke();
  rect(0, 0, width, height);
  //translate(width/1, height/50);
  noFill();
  fill(-1, 0);
  if (beat.isOnset()) rad = rad * 0.9f;
    else rad = 70;
  ellipse(0, 0, 2 * rad, 2 * rad);
  strokeCap(PROJECT);
  stroke(-1, 30);
  int bsize = player.bufferSize();
  for (int i = 0; i < bsize - 1; i += 5) {
    float x = 4 * (r)*cos(i*2*PI/bsize);
    float y =  4 * (r)*sin(i*2*PI/bsize);
    float x2 = 4 * (r + player.left.get(i)*100)*cos(i*2*PI/bsize);
    float y2 = 4 * (r + player.left.get(i)*100)*sin(i*2*PI/bsize);
    line(x, y, x2, y2);
  }
}
void keyPressed() {
  if (key==' ')exit();
  if (key=='s' || key=='S')endRecord();
}

0 个答案:

没有答案