I have started learning angular.js a few days ago.
This does not load views in angular.html. I'm not sure what is wrong with the code
angular.html
saved in the view1.html
and view2.html < There are
root / partials
folders in / code>.
angular.html
View 1.html
& lt; Div & gt; & Lt; Input type = "text" data-ng-model = "filter.name" & gt; {{Filter.name | Uppercase}} & lt; H3 & gt; View 1 & lt; / H3 & gt; & Lt; Ul & gt; & Lt; Li data-ng-repeat = "client in filter | filter: filter.name | orderBy: 'city'" & gt; {{Client.name}} & lt; Br> & Lt; / Li & gt; & Lt; / Ul & gt; New customer: & lt; Input type = "text" data-ng-model = "newclient.name" & gt; & Lt; Br / & gt; Client City & lt; Input type = "text" data-ng-model = "newClient.city" & gt; & Lt; Br / & gt; & Lt; Button data-ng-click = "addClient ()" & gt; Add Customers & lt; / Button & gt; & Lt; Br / & gt; & Lt; A href = "# / view2" & gt; See 2 & lt; / A & gt; & Lt; / Div & gt;
view2.html
& lt; Div class = "container" & gt; & Lt; Input type = "text" data-ng-model = "filter.name" & gt; {{Filter.name | Uppercase}} & lt; Br> & Lt; H3 & gt; See 2 & lt; / H3 & gt; & Lt; Ul & gt; & Lt; Li data-ng-repeat = "client in filter | filter: filter.name | orderBy: 'city'" & gt; {{$ Scope.client.name}} in {{$ Scope.client.city}} & lt; Br> & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; A href = "# / View 1" & gt; View 1 & lt; / A & gt; & Lt; / Div & gt;
You must have a view according to your query
TemplateUrl: 'root / partials / view2.html'
and
templateUrl: 'root / partials / view1.html'
respectively
Comments
Post a Comment