从Angular2 access global service without including it in every constructor我已经抓住了代码,并略作修改成: @Injectable()
export class ApiService {
constructor(public http: Http) {}
get(url: string) {
如何从字符串中读取特定字符的索引值(如'+'),而不使用任何函数。他们告诉我用循环做这个。 (在家工作,我不能使用的功课标签由于低信誉) 我这样做: S = input() for position in range(0,len(S)): if S[position] == '+': print(S[position]) 什么我正为输出+符号本身,而不是它的索引。 谢谢!
考虑以下源类型: public class BaseViewModel
{
public string Prop1 { get; set; }
}
public class FirstViewModelImpl : BaseViewModel
{
public string Prop2 { get; set; }
}
public class SecondVie