angularjs - routProvider controller inside of html file -
i can this?
$routeprovider.when('/developer/logs', { templateurl: '/themes/default/template/developer_logs.html', controller: "developerlogsctrl" });
and in developer_logs.html
<script> app.controller('developerlogsctrl', function($location, $rootscope) { $rootscope.pagetitle= 'developer logs'; }); </script> <div class="content-heading"> <ol class="breadcrumb"> <h1>logs</h1> <li><a href="/">dashboard</a> </li> <li>developer</li> <li class="active">logs</li> </ol> </div> <div>asfa8fhfga</div>
i tried http://errors.angularjs.org/1.4.8/ng/areq?p0=developerlogsctrl&p1=not%20a
you can't lazy load angular code within templates.
there no built in lazy load mechanism either without using third party modules.
include components in initial page load or third party load managers
Comments
Post a Comment