通过mysql的Angular验证登录后的Onsen UI,如何显示我的主屏幕?

通过mysql的Angular验证登录后的Onsen UI,如何显示我的主屏幕?,mysql,angularjs,onsen-ui,Mysql,Angularjs,Onsen Ui,我的应用程序有10多个屏幕,我想为编程顺序,以保持每个屏幕不同的html文件。在索引文件中,我有登录屏幕,在angular控制器中,我连接到MySQL数据库,它从数据库返回响应。现在如何调用主配置文件页面profile.html 我的JS代码: var myApp = angular.module('Appname', ['onsen.directives']); myApp.controller("LogInController", function ($scope, $http) {

我的应用程序有10多个屏幕,我想为编程顺序,以保持每个屏幕不同的html文件。在索引文件中,我有登录屏幕,在angular控制器中,我连接到MySQL数据库,它从数据库返回响应。现在如何调用主配置文件页面profile.html

我的JS代码:

var myApp = angular.module('Appname', ['onsen.directives']);
myApp.controller("LogInController", function ($scope, $http) {
    $scope.errors = [];
    $scope.msgs = [];
    $scope.login = function () {

        $scope.errors.splice(0, $scope.errors.length);
        $scope.msgs.splice(0, $scope.msgs.length);

        $http.post('http://192.168.1.2/login.php', {'u':"Username", 'p':"Password"}).
        success(function (data, status, headers, config) {
            $scope.posts = data;
            console.log(data);
            alert(data[0].msg);
            //here I want to put main page profile.html
        }).
        error(function (data, status, headers, config) {
        alert(data);
    });

}});
如果我没有使用正确的方法,你能给我推荐另一个例子吗???

希望这条线索能有所帮助。 你能试试这样的吗

$scope.ons.navigator.pushPage('profile.html');

谢谢。这是非常有用的,而且需要在控制器标记内的索引文件中使用