Angularjs: Multiples partials in single html?
Templates can be embedded in the main html. For example, with the following index.html: <!DOCTYPE html> <html ng-app=app> <meta charset=utf-8> <title>App</title> <ng-view>Loading…</ng-view> <script type=text/ng-template id=partial1.html> <p>foo = {{foo}}</p> </script> <script type=text/ng-template id=partial2.html> <p>Contents of partial2.html</p> </script> <script src=app.js></script> you can use the following app.js: angular.module(‘app’, [], [‘$routeProvider’, ‘$controllerProvider’, function($routeProvider, $controllerProvider) { $routeProvider.when(‘/p1’, { templateUrl: ‘partial1.html’, … Read more