angular 2 azure deploy refresh error : The resource you are looking for has been removed, had its name changed, or is temporarily unavailable

后端 未结 6 1072
半阙折子戏
半阙折子戏 2020-12-04 23:49

I have an Angular 2 rc-2 app with basic routing implemented.The paths are /path1 which is the default path and /path2.The home path /

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 00:28

    I also faced this issue and got around this error by using following code:

    import { NgModule }      from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser'; 
    import { FormsModule }   from '@angular/forms';
    import { AppComponent }  from './app.component';
    import { routing }       from './app.routes';
    import {AgmCoreModule} from 'angular2-google-maps/core';
    import { LocationStrategy, HashLocationStrategy } from '@angular/common';
    
    @NgModule({
      imports: [ BrowserModule, FormsModule, routing, AgmCoreModule.forRoot() ],
      declarations: [ AppComponent ],
      bootstrap: [ AppComponent ],
      providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}]
    })
    
    export class AppModule { }
    

    You can learn more about HashLocationStrategy here : https://angular.io/docs/ts/latest/api/common/index/HashLocationStrategy-class.html

提交回复
热议问题