1 Star 0 Fork 0

JXHuang / ng9-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

例子

其他目录是原来的例子可以不理,只是拉下来看下懒得删除。 由于本人太熟悉vue的status状态管理了,所有不单独列出组件传参的例子。自行百度

下面是例子对应的文件夹

  • 自定义模板 template-diy
  • 动态组件 template-dynamic template-form
  • 模板传值 template-variables template-form
  • 元素操作 text-danger.directive
  • 内容投影 content-part-layout content-part-a content-part-b
  • 动态加载不同组件,选项卡 template-dynamic-service template-dynamic-service.servicer app.component
  • 全局状态 status-global-a status-global-b template-dynamic-service.servicer app.component

angular-cli常用指令

你可以使用ng generate命令,为已有的 Angular 应用程序添加新的功能。
ng generate class my-new-class: 新建 class
ng generate component my-new-component: 新建组件
ng generate directive my-new-directive: 新建指令
ng generate enum my-new-enum: 新建枚举
ng generate module my-new-module: 新建模块
ng generate pipe my-new-pipe: 新建管道
ng generate service my-new-service: 新建服务

ng generate快捷键:
ng g cl my-new-class: 新建 class
ng g c my-new-component: 新建组件
ng g d my-new-directive: 新建指令
ng g e my-new-enum: 新建枚举
ng g m my-new-module: 新建模块
ng g p my-new-pipe: 新建管道
ng g s my-new-service: 新建服务

其他添加功能用法:
创建带路由的模块ng generate module 模块名 --routing
创建模块下的组件ng generate component 模块名/组件名
创建全局服务ng generate service hero --module=app
创建路由控制器ng generate module app -routing --flat --module=app
--flat:不单独创建一个文件夹。只创建文件
--module=app :告诉 CLI 把它注册到 AppModule 的 imports 数组中。
运行程序:ng serve --port 4200 --open --host 0.0.0.0
--port:表示程序运行的端口号为4200
--open:打开到浏览器,访问程序
--host: 设置host
MIT License Copyright (c) 2020 JXHuang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

angular9 例子 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/JXHuang_admin/ng9-demo.git
git@gitee.com:JXHuang_admin/ng9-demo.git
JXHuang_admin
ng9-demo
ng9-demo
master

搜索帮助