All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.asayama.gwt.angular.site.examples.client.UrlHashParameterExampleController Maven / Gradle / Ivy

Go to download

An example GWT Angular module demonstrating the use of hash parameter in the URL.

There is a newer version: 1.0.3
Show newest version
package com.asayama.gwt.angular.site.examples.client;

import com.asayama.gwt.angular.client.Controller;
import com.asayama.gwt.angular.client.location.Location;
import com.asayama.gwt.angular.route.client.RouteParams;

public class UrlHashParameterExampleController implements Controller {

    // Injectable fields are automatically injected by the framework
    
    private RouteParams routeParams;
    private Location location;

    // Other fields are used to represent the state of this controller

    private String page;

    @Override
    public void onControllerLoad() {
        page = routeParams.getString("page");
    }

    // Public methods are automatically wired to AngularJS's $scope.

    public void onClickGo(String page) {
        location.setHashParam("page", page);
    }

    public String getName() {
        return page;
    }
    
    public void setPage(String page) {
        this.page = page;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy