小编crg*_*den的帖子

IIS 8上使用HTTP平台处理程序的Rails 4?

有没有人有微软HTTP平台处理程序 IIS扩展的经验呢?我正在关注几个月前写的这个很棒的教程,我已经安装了Ruby on Rails:

C:\> ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]

C:\> rails -v
Rails 4.1.2
Run Code Online (Sandbox Code Playgroud)

Rails从提示符启动并在端口3000运行正常:

C:\> rails s
=> Booting WEBrick
=> Rails 4.2.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-05-01 02:42:49] INFO WEBrick 1.3.1
[2015-05-01 02:42:49] INFO ruby 2.1.5 (2014-11-13) [i386-mingw32]
[2015-05-01 02:42:49] INFO WEBrick::HTTPServer#start: pid=9448 port=3000
Run Code Online (Sandbox Code Playgroud)

这很棒,但每当我尝试浏览localhost/app(而不是localhost:3000)时,我都会感到害怕"我们很抱歉,但出了点问题."

这是我的应用程序的web.configIIS文件:

<?xml version="1.0"?>
<configuration> …
Run Code Online (Sandbox Code Playgroud)

ruby iis ruby-on-rails-4

6
推荐指数
0
解决办法
2341
查看次数

带解析器的Angular 7路线不会加载组件

我遇到了一个Angular 7问题,该问题是在路由上具有解析器的模块的子组件无法加载。

app-routing.module.ts

{
  path: 'Account',
  loadChildren: './account/account.module#AccountModule'
}
Run Code Online (Sandbox Code Playgroud)

account-routing.module.ts

{
  path: 'Profile',
  component: ProfileComponent,
  resolve: {
    profile: ProfileResolver
  }
}
Run Code Online (Sandbox Code Playgroud)

profile.resolver.ts

@Injectable()
export class ProfileResolver implements Resolve<Profile> {

  constructor(private readonly accountService: AccountService) {
  }

  resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Profile> {
    return this.accountService.profile();
  }
}
Run Code Online (Sandbox Code Playgroud)

profile.component.ts

@Component({
?
})
export class ProfileComponent implements OnInit {

  model: Profile;

  constructor(private readonly route: ActivatedRoute) {
  }

  ngOnInit(): void {
    this.model = this.route.snapshot.data['profile'] as Profile;
  }
}
Run Code Online (Sandbox Code Playgroud)

account.service.ts

@Injectable()
export class AccountService {

  constructor(protected …
Run Code Online (Sandbox Code Playgroud)

rxjs angular angular7

2
推荐指数
1
解决办法
1721
查看次数

标签 统计

angular ×1

angular7 ×1

iis ×1

ruby ×1

ruby-on-rails-4 ×1

rxjs ×1