The application structure:

in app.module.ts:

import { NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {AppComponent} from './app.component';
import {HomeModule} from './components/home/home.module'; @NgModule({
imports:[BrowserModule, HomeModule],
declarations:[AppComponent],
bootstrap:[AppComponent]
})
export class AppModule{}

components/home/home.module.ts:

import { NgModule} from '@angular/core';
import {HomeComponent} from './home.component';
@NgModule({
declarations: [HomeComponent],
exports: [HomeComponent]
})
export class HomeModule { }

[Angular 2] Import custom module的更多相关文章

  1. [Angular] Implement a custom form component by using control value accessor

    We have a form component: <label> <h3>Type</h3> <workout-type formControlName=& ...

  2. ou can mix require and export. You can't mix import and module.exports.

    ou can mix require and export. You can't mix import and module.exports.

  3. 在eclipse中用java调用python报错 Exception in thread "main" ImportError: Cannot import site module and its dependencies

    最近做项目需要用java调用python,配置了jython后,运行了例子代码: 获得一个元组里面的元素: import org.python.util.PythonInterpreter; publ ...

  4. import script module

    import script module .mjs <script type="module"> import {addTextToBody} from './util ...

  5. [Angular] Create a custom validator for reactive forms in Angular

    Also check: directive for form validation User input validation is a core part of creating proper HT ...

  6. [Angular Tutorial] 11 -Custom Filters

    在这一步中您将学到如何创建您自己的展示过滤器. ·在先前的步骤中,细节页面展示“true”或“false”来显示某部电话是否有某项功能.在这一步中,我们将使用自定义的过滤器来将这些个字符串转化成符号: ...

  7. [Angular] Create a custom validator for template driven forms in Angular

    User input validation is a core part of creating proper HTML forms. Form validators not only help yo ...

  8. [Angular Router] Lazy loading Module with Auxiliary router

    Found the way to handle Auxiliary router for lazy loading moudle and erge load module are different. ...

  9. [Angular] Create a custom pipe

    For example we want to create a pipe, to tranform byte to Mb. We using it in html like: <div> ...

随机推荐

  1. [转] GIS二次开发(C#+AE)

    乘风莫邪 原文GIS二次开发(C#+AE) 此过程描述了使用ArcGIS控件建立和部署应用的方法和步骤. 你可以在下面的目录下找到相应的样例程序: <</FONT>安装目录>/ ...

  2. Android 翻页效果 电子书

    转载请注明来自: 5进制空间-android区 相信做电子书的同学,都遇到过翻页动画的需求吧,如果你不满足与点击滑动翻页的话,这边文章应该能够帮助到你. 先上个效果图: 效果还是很不错的,不过与ibo ...

  3. C# 替换文本文件中的某一行

    C# 替换文本文件中的某一行 (要求此文件存在) /// <summary> /// LineIndex 表示新的内容所在的行位置 /// </summary> /// < ...

  4. Request、Request.Form和Request.QueryString的区别

    Request.Form:获取以POST方式提交的数据(接收Form提交来的数据): Request.QueryString:获取地址栏参数(以GET方式提交的数据) Request:包含以上两种方式 ...

  5. java Ant 的使用

    Apache Ant 1.7.0 is the best available version的下载地址:http://ant.apache.org/bindownload.cgi 部署: 参考JAVA ...

  6. LeetCode题解——Integer to Roman

    题目: 将整数转换为罗马数字.罗马数字规则可以参考: 维基百科-罗马数字 解法: 类似于进制转换,从大的基数开始,求整数对基数的商和余,来进行转换. 代码: class Solution { publ ...

  7. Python多线程和Python的锁

    Python多线程 Python中实现多线程有两种方式,一种基于_thread模块(在Python2.x版本中为thread模块,没有下划线)的start_new_thread()函数,另一种基于th ...

  8. web服务器分析与设计(二)

    面向对象分析与设计第二步:寻找对象,建立问题域模型 1,用例场景描述 接上一篇中的用例,编写用例场景 U1: 上网者:打开网站(www.xxx.com) 浏览器:连接网站 目标系统:接受连接 检查连接 ...

  9. Linux服务器下没有root权限装Matlab R2013a

    Matlab R2013a Unix版下载地址 注意:由于我是在单位的集群系统上装Matlab,没有root权限,故下载下来的.iso文件不能在linux下用mount命令挂载,故先在Win下解压,再 ...

  10. leetcode@ [316] Remove Duplicate Letters (Stack & Greedy)

    https://leetcode.com/problems/remove-duplicate-letters/ Given a string which contains only lowercase ...