How to use the $ stateProvider route in angularjs to transmit Parameters

Source: Internet
Author: User
In the Edit function, click the edit button to jump to the Edit page and PASS Parameters. How should I write the jump url. There is also how to make editing and publishing use a page together, how should the routing be written in the editing function at this time, click the edit button to jump to the editing page and PASS Parameters, how to write the jump url. And how to make the editing and publishing share a page, how should the route be written at this time?

Reply content:

In the Edit function, click the edit button to jump to the Edit page and PASS Parameters. How should I write the jump url. And how to make the editing and publishing share a page, how should the route be written at this time?

You should understand this.
Learn ui-router-route control

If you do not understand what you mean, write the url as follows: "/a/B/: id"
Or
The parameter accepted on the target page is $ stateProvider. state ('page2', {params: {'data': null }})
Parameter: $ state. go ('page2', {data: 'aaa '});

Or
Accept parameters on the target page: After the Controller injects $ stateParams, you can get 'aaa' through $ stateParams. data'

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.