Angular path and angular path

Source: Internet
Author: User

Angular path and angular path

When writing a project, we will see the boot page to the boot page, and the boot page to the home page,

When we use angular framework to write such things, if we are not careful, we will encounter problems,

For example, you cannot find images on the boot page.

So how can we solve this problem?

First, we need to make it clear that the angular framework we use should be used to solve this problem,

Instead of using the path step by step based on the original idea.

Next let's take a look,

1. Jump to the boot page

App. controller ("zeroController", function ($ timeout) {var timer = $ timeout (function () {location. href = "#/enter"; // note the jump path}, 1000 );});

2. Jump to the home page on the boot page

// Boot page app. controller ("enterController", function ($ scope) {// Touchmove () events triggered when the finger moves on the screen, when the finger moves on the screen, the browser's document should be blocked. addEventListener ("touchmove", function (e) {var ev = e | e. widows; ev. preventDefault () ;}, {passive: false}) ;}( Zepto); $ scope. enter = function () {location. href = "index.html #/reg"; // error notes }});

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.