routes - ng view is not working but ng include work in angularjs -


can please me, don't know doing wrong. following mean web development tutorial. ng-include works ok templates, ng-view not. have 5 files. first users.client.module.js:

angular.module('users', []); 

second users.client.controller.js

    angular.module('users',['ngroute']).controller('userscontroller', ['$scope',  function ($scope){     $scope.name = 'userscont';     console.log("from userscont"); }]); 

third users.client.routes.js

angular.module('users').config(['$routeprovider', function ($routeprovider) {     $routeprovider     .when('/', {         templateurl: 'users/views/register-user.client.view.html'      })     .otherwise({         templateurl: '/somewhere else'     }); }]); 

fourth register-client-view.html

<section ng-controller="userscontroller">     <h1>{{ name }}</h1> </section> 

and last index.html

<section ng-include=" 'users/views/register-user.client.view.html' "></section>  <section ng-view> </section>  <script type="text/javascript" src="/users/users.client.module.js"></script>     <script type="text/javascript" src="/users/controllers/users.client.controller.js"></script> 

please help

you have use ngroute dependency that

try following code

var app = angular.module('users', ['ngroute']); 

and dont forget include angular route js file after angular main js file.

<script src="scripts/vendors/angular-route.min.js"></script> 

Comments