WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #14310, comment 44


Ignore:
Timestamp:
03/17/13 21:49:07 (2 years ago)
Author:
louisremi
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14310, comment 44

    v1 v2  
    1 I'm trying to recreate the template hierarchy logic on a client side with AngularJS. I want client-side templates to be picked by the Angular router based on current path and naming convention using the same rules that are used by WordPress on the server side. 
     1I'm trying to recreate the template hierarchy logic on the client side with AngularJS. I want client-side templates to be picked by the Angular router based on current path and naming convention using the same rules that are used by WordPress on the server side. 
    22 
    33The easiest way to achieve this is to get the computed array of $templates from the server side whenever the location path changes on the client side, then check which client-side template fits.