zoukankan      html  css  js  c++  java
  • Angular 4 路由介绍

    Angular 4 路由

    1. 创建工程

    ng new router --routing

    2. 创建home和product组件

    ng g component home

    ng g component product

    3. 配置路由

    4. 主页面导航

    二、按钮事件中实现导航

    toProductdetails方法如下

    三、不存在的页面

    如果页面不存在,则需要创建一个404的页面

    1. 创建组件

    ng g component code404

    2.添加路由

    3.页面中提示页面不存在

    4. 效果图

    
    
  • 相关阅读:
    StackView
    横竖屏
    Html
    UILabel
    NSString
    NSPredicate|谓词
    iphone
    函数
    UIBezierPath
    UICollectionView
  • 原文地址:https://www.cnblogs.com/linlf03/p/7356312.html
Copyright © 2011-2022 走看看