[Angular 2] Import custom module
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的更多相关文章
- [Angular] Implement a custom form component by using control value accessor
We have a form component: <label> <h3>Type</h3> <workout-type formControlName=& ...
- 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.
- 在eclipse中用java调用python报错 Exception in thread "main" ImportError: Cannot import site module and its dependencies
最近做项目需要用java调用python,配置了jython后,运行了例子代码: 获得一个元组里面的元素: import org.python.util.PythonInterpreter; publ ...
- import script module
import script module .mjs <script type="module"> import {addTextToBody} from './util ...
- [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 ...
- [Angular Tutorial] 11 -Custom Filters
在这一步中您将学到如何创建您自己的展示过滤器. ·在先前的步骤中,细节页面展示“true”或“false”来显示某部电话是否有某项功能.在这一步中,我们将使用自定义的过滤器来将这些个字符串转化成符号: ...
- [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 ...
- [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. ...
- [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> ...
随机推荐
- 修改Oracle 表空间名称 tablespace name
修改表空间名称步骤如下: 1. 使用oracle用户登录执行 $sqlplus / as sysdba 2. 执行修改表空间命令如下 SQL> alter tablespace TEST re ...
- 10、TV UI
TV UI布局 1. 为大屏幕提供适当的布局源文件. 2. 确保UI在一定距离仍然可以看清. 3. 为高清电视提供高分辨率的图标和图像. 1. 把屏幕上的导航控制菜单放在屏幕的左边或者右边,并且将 ...
- Matlab编程实例(3) 函数向左或向右平移N点 左移右移
%函数移动 close all; clear all; dir=input('请输入平移方向,“1”为向左,“2”为向右'); if dir~=1&&dir~=2;%输入控制 e ...
- HDU5731 Solid Dominoes Tilings 状压dp+状压容斥
题意:给定n,m的矩阵,就是求稳定的骨牌完美覆盖,也就是相邻的两行或者两列都至少有一个骨牌 分析:第一步: 如果是单单求骨牌完美覆盖,请先去学基础的插头dp(其实也是基础的状压dp)骨牌覆盖 hiho ...
- bjfu1208 中位数
题目是给你一个数x以及一个长度为n的数列,让你往数列里插入y个数,使数列的中位数正好是x,求y的最小值.(其实这题的中位数跟数学里的中位数有一点区别,略去不提) 那么就排完序以后分情况讨论一下就好了. ...
- 【LeetCode 208】Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith methods. Note:You may assume that all inputs ar ...
- [BILL WEI] A potentially dangerous Request.Path value was detected from the client 异常处理办法
我们在ASP.net中使用URL导向后, 我们在访问某个地址,或者打开某个系统页面的时候,就会报错误: A potentially dangerous Request.Path value was d ...
- 警惕javascript代码中的“</script>”!
之前在写<博客园自定义博客侧边栏公告的过滤漏洞>的时候遇到了一个javascript代码报错“语法错误”的问题,一直不得以解决,感谢Arliang发现了并为我进行了耐心的解释,现整理如下: ...
- SqlHelper 带详细中文注释
using System; using System.Collections.Generic; using System.Linq; using System.Text; //对数据库进行操作引入命名 ...
- 机器学习中的数学(5)-强大的矩阵奇异值分解(SVD)及其应用
版权声明: 本文由LeftNotEasy发布于http://leftnoteasy.cnblogs.com, 本文可以被全部的转载或者部分使用,但请注明出处,如果有问题,请联系wheeleast@gm ...