本文整理匯總了TypeScript中angular2/platform/browser.BrowserDomAdapter.makeCurrent方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript BrowserDomAdapter.makeCurrent方法的具體用法?TypeScript BrowserDomAdapter.makeCurrent怎麽用?TypeScript BrowserDomAdapter.makeCurrent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類angular2/platform/browser.BrowserDomAdapter
的用法示例。
在下文中一共展示了BrowserDomAdapter.makeCurrent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Movie
import {provide} from "angular2/core";
import {BrowserDomAdapter} from 'angular2/platform/browser';
import {it, describe, expect, inject, beforeEachProviders,
beforeEach, TestComponentBuilder, injectAsync} from "angular2/testing";
import {Observable} from "rxjs";
import {Movie} from "../app/models/Movie";
import {MovieList} from "../app/list/movie-list";
import {MovieService} from "../app/services/MovieService";
import {HTTP_PROVIDERS, Http} from "angular2/http";
import {Router} from "angular2/router";
BrowserDomAdapter.makeCurrent();
class FakeService extends MovieService {
constructor() {
super(null);
}
getAll() {
let movies = [[
new Movie(1, "", 1, 1),
new Movie(1, "", 1, 1),
new Movie(1, "", 1, 1)
]];
return Observable.from(movies);
}
}
describe("The MovieList component", () => {