javascript - How do I make scripts in the main layout apply to an angularjs view when it loads? -


i'm trying integrate angularjs existing site. problem i've transformed section of main page angular view when latter loaded main page using ng-route main page slider scripts located @ bottom of main page not seem render in loaded view.

does have idea how through this. thanks.

</div> </header> <div data-ng-view></div> <footer id="footer"> <div class="container">  (function() {   var app = angular.module('hbcm', ['ngroute']);    angular.module('hbcm').controller('dsplcontroller', function() {     this.panel = 1;    });    app.config(function($routeprovider) {     $routeprovider       .when('/', {         controller: 'dsplcontroller',         templateurl: 'view1.html'       })       .when('/about-us/', {            templateurl: 'about-us.html'       })       .otherwise({         redirectto: '/'       });   }); })(); 

create controller handle template (view), , attach controller in route configuration

$routeprovider.when('/somewhere',  { controller: thenameofyourcontroller, }); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -