zoukankan      html  css  js  c++  java
  • angular2学习 -- 基本配置学习

      开始学习angular2了,内心还是有点小激动的,看到angular2的文档以及教程后,那份欣喜更重了。

      首先选择javascript模式而不是typescript模式(我不会)然后就按照教程上面的配置npm依赖包了,安装之后跳过typescript,复制粘贴app.component.js,boot.js,index.html文件.然后配置nginx静态文件,马上效果就出来了,论文档的重要性!

      好了到此开始了解app.core.Component是什么东东了,打开api review -》查找Component , 文档就出来了,在我看来它的文档比react好多了,起码react到死也不会给个例子出来,忘不了那段痛苦的学习经历,但是react学起来还是挺简单的。 下面开始复制粘贴:

      

    constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, bindings,
                 providers, viewBindings, viewProviders,
                 changeDetection = ChangeDetectionStrategy.Default, queries, templateUrl, template,
                 styleUrls, styles, directives, pipes, encapsulation}?: {
      selector?: string,
      inputs?: string[],
      outputs?: string[],
      properties?: string[],
      events?: string[],
      host?: {[key: string]: string},
      /** @deprecated */ bindings?: any[],
      providers?: any[],
      exportAs?: string,
      moduleId?: string,
      /** @deprecated */ viewBindings?: any[],
      viewProviders?: any[],
      queries?: {[key: string]: any},
      changeDetection?: ChangeDetectionStrategy,
      templateUrl?: string,   //模板url
      template?: string,      //模板
      styleUrls?: string[],    //样式url
      styles?: string[],      //样式
      directives?: Array<Type | any[]>,
      pipes?: Array<Type | any[]>,
      encapsulation?: ViewEncapsulation
    })
  • 相关阅读:
    Golang 读写文件的操作
    初始 Elasticsearch
    数据存储单位的换算(bytes、KB MB GB TB PB EB ZB YB DB NB)
    Go 语言类型元信息的通用结构 _type
    空接口
    HashMap和Hashtable的区别
    谈谈final, finally, finalize的区别
    理解AOP
    Struts2 OGNL概述
    Struts2原理
  • 原文地址:https://www.cnblogs.com/lifeisshort/p/5126001.html
Copyright © 2011-2022 走看看