angular routing - Angularjs : [$injector:modulerr] error -


I do not understand what my fault is when I load the root URL, then this unicode error [ $ Injector: Modular] shows, and "/ ssh" is also not working, I'm using 1.3. Here's my code:

  & lt ;! DOCTYPE html & gt; & Lt; Html ng-app = "hiren" & gt; & Lt; Head lang = "en" & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Base href = "/" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "col-sm-1" ng-view & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Script src = "lib / angular / angular.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "lib / angular-route / angular-route.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "src / hiren.js" & gt; & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

hiren.js:

  Angular Modules ('hire', ['nigrout']). Config (function ($ route provider, $ location provider) {$ routeProvider. ('/ Ssh', {templateUrl: 'views / ssh.html', controller: 'ssh'}); $ locationProvider.html5Mode (true);}) . Controller ('ssh', function ($ scope) {$ scope.xox = "example";});  

You have to wrap your angel code in script tags and tag it with html tags

  & lt; Script & gt; Angular Modules ('rent', ['ngrut']). Config (function ($ route provider, $ location provider) {$ routeProvider. ('/ Ssh', {templateUrl: 'views / ssh.html', controller: 'ssh'}); $ locationProvider.html5Mode (true);}) . Controller ('ssh', function ($ scope) {$ scope.xox = "example";}); & Lt; Script & gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -