angularjs - Angular ui-router on wordpress page -
i'm developing on http://localhost:3000/af2015/web/
(the directories not present on production site) , using wordpress. angular app on /recommendations
page, includes template:
<div ng-app="af2015app"> <div ng-controller="mapctrl vm"> <map center="[52.374, 4.899]" zoom="12"> </map> </div> <section> <div ui-view> </div> </section> </div>
the ui-view
template not being loaded, nor controller being initialised. config function, , have tried sorts of permutations of <base href="/af2015/web" />
tag. there no errors in console.
angular.module('af2015app') .config(function($stateprovider, $locationprovider) { $locationprovider.html5mode(true); $stateprovider.state('list', { //url: '/:alpha/:beta/:gamma', url: '/recommendations', template: '<h2>list</h2>', controller: "listcontroller", controlleras: 'list' }); });
didn't try enough permutations. 1 worked:
<base href="/af2015/web/recommendations/" />
and then
$stateprovider.state('list', { url: '/',
Comments
Post a Comment