angular.js - Page jump problem in angular project development
某草草2017-05-15 17:12:15
0
2
781
In real project development, there are many pages. Do each page go through an index page? Put a <p ui-view></p> in the index page and then configure many routes. Jump, what about the parameter transfer?
What you are talking about should be an example of using angularjs to implement a single-page application. Generally, we will put public references and common navigation in the index and then write ng-view in the area where we want to implement the jump module, and then use the app. js configure jump routes and corresponding controllers. Put controllers with similar functions and businesses together like this
Yes, SPA single-page application jumps by configuring routes. In HTML, <ui-view></ui-view> is used to define the content jump part. The essence of ui-router is to embed set, so this ui-view can be multi-layered 2. Parameter configuration, first explain the parameter name in the routing configuration part
In the example, there are two parameters, order_id and order_status. You can splice the parameters into the URL. :order_id is spliced. :order_id就是拼接的 在跳转的过程中传递参数ui-sref="order.detail({ order_id: order.id })"Pass the parameter ui-sref="order. detail({ order_id: order.id })"
What you are talking about should be an example of using angularjs to implement a single-page application. Generally, we will put public references and common navigation in the index and then write ng-view in the area where we want to implement the jump module, and then use the app. js configure jump routes and corresponding controllers. Put controllers with similar functions and businesses together like this
Yes, SPA single-page application jumps by configuring routes. In HTML, <ui-view></ui-view> is used to define the content jump part. The essence of ui-router is to embed set, so this ui-view can be multi-layered
2. Parameter configuration, first explain the parameter name in the routing configuration part
In the example, there are two parameters, order_id and order_status. You can splice the parameters into the URL.
:order_id
is spliced.:order_id
就是拼接的在跳转的过程中传递参数
ui-sref="order.detail({ order_id: order.id })"
Pass the parameterui-sref="order. detail({ order_id: order.id })"