第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用帶有角度2的http rest apis

使用帶有角度2的http rest apis

MM們 2019-07-27 10:20:07
使用帶有角度2的http rest apis所以,我正在通過打字稿在他們的網(wǎng)站上關注角度2指南,并且我陷入了http api集成。我正在嘗試創(chuàng)建一個簡單的應用程序,可以通過soundcloud api搜索一首歌,但是我很難實現(xiàn)和理解如何開始,而且在線資源以很多不同的方式完成它(我相信快速的角度2語法更改)早些時候)。所以目前我的項目看起來像這樣app   components     home       home.component.ts      ...     search       search.component.ts      ...     app.ts    ...   services     soundcloud.ts   bootstrap.ts index.html在示例中沒有任何花哨的東西,主要文件將是app.tsimport {Component, View} from 'angular2/core';import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';import {HomeComponent} from './home/home.component';import {SearchComponent} from './search/search.component';@Component({     selector: 'app',     templateUrl: 'app/components/app.html',     directives: [ROUTER_DIRECTIVES]})@RouteConfig([   {path: '/home', name: 'Home', component: HomeComponent, useAsDefault: true},   {path: '/search', name: 'Search', component: SearchComponent}])export class App { }bootstrap.ts    import {App}     from './components/app';import {bootstrap}        from 'angular2/platform/browser';import {ROUTER_PROVIDERS} from 'angular2/router';bootstrap(App, [   ROUTER_PROVIDERS]);我試圖找出soundcloud.ts然而我不能和以下方法有錯誤,即@Inject沒有找到(我假設我在這里使用過時的語法)?;旧衔蚁朐谖业膽贸绦虮韱嗡阉鹘M件中使用soundcloud服務進行api調用。import {Injectable} from 'angular2/core'import {Http} from 'angular2/http'@Injectable()export class SoundcloudService {  http : Http  constructor(@Inject(Http) http) {    this.http = http;  }}soundcloud api不包括在這里,因為我不能先得到基礎知識。
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 551 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號