Problem to show Data in Routing ng-view - Ideas to solve it?

7 views
Skip to first unread message

Michael S.

unread,
Mar 19, 2018, 7:44:17 AM3/19/18
to Angular and AngularJS discussion
Hello, i have a problem with my single Page Application, maybe anone can help me. The Problem is simple. When i start my Project with the keyuser.html as first site(home page) the Table from the connected Database is shown with the Data. When i use the normal home.html as entry Pint for my Programm, i can click the Hyperlink to my keyuser.html file, the controller does the necessary routing and i am on my keyuser.html site. But here is just the update Button, but not my Table with my Data. Has anyone an idea for me. Already tried some stuff. Maybe i missed something here... please feel free to ask me details an other information necessary. Hope anyone can help me!

+++++++++++++++ Thats my keyuser.html +++++++++
<!DOCTYPE html>

<html>

<head>

<title></title>

</head>

<body>

<h1>Keyuser</h1>

<button onclick="update()">Update</button>

<div id="flexGrid"></div>

</body>

</html>

<script>

var cv = new wijmo.collections.CollectionView();

var flexGrid = new wijmo.grid.FlexGrid('#flexGrid');

flexGrid.itemsSource = cv;

// Get Data

wijmo.httpRequest("/api/Colors", {

success: function (xhr) {

cv.sourceCollection = JSON.parse(xhr.response);

}

});

</script>
+++++++++++++++ Thats my keyuser.html +++++++++

In my home.html i do the routing with:

+++++++++++++++ home.html +++++++++++++++++++++

<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.min.js"></script>


<script src="http://cdn.wijmo.com/5.latest/controls/wijmo.grid.min.js"></script>

....

<div ng-app="myApp">

<a href="#!keyuser">Stammdaten</a>

<div ng-view></

div>

</div>

....

+++++++++++++++ home.html +++++++++++++++++++++


My control.js looks like this:


+++++++++++++++ control.js ++++++++++++++++++++

var app = angular.module("myApp", ["ngRoute"]);


app.config(function ($routeProvider) {

$routeProvider

.when("/keyuser", {

templateUrl: "keyuser.html"

})


});


+++++++++++++++ control.js ++++++++++++++++++++


































Reply all
Reply to author
Forward
0 new messages