Skip to content
This repository was archived by the owner on Jan 25, 2021. It is now read-only.
This repository was archived by the owner on Jan 25, 2021. It is now read-only.

ng-click is not working after updating to iron-router. #48

Description

@siboyapati

After updating to iron-router the ng-click on the anchor tag is not working.

screen shot 2014-12-16 at 3 25 17 pm

Here is my router:
Router.route('/login', {
controller: 'LoginController',
action: 'login'
});

Router.route('/home', {
controller: 'HomeController',
action: 'home'
});

if (Meteor.isClient) {
ApplicationController = RouteController.extend({
onBeforeAction: function () {
console.log('app before hook!');
this.next();
},
action: function () {
console.log('this should be overridden!');
}
});

Router.onAfterAction(function (req, res, next) {
    Tracker.afterFlush(function () {
        angular.element(document).injector().invoke(['$compile', '$document', '$rootScope',
            function ($compile, $document, $rootScope) {
                $compile($document)($rootScope);
                if (!$rootScope.$$phase)
                    $rootScope.$apply();
            }
        ]);
    });
});



LoginController = ApplicationController.extend({
    login: function () {
        this.render('login');
    }
});

HomeController = ApplicationController.extend({
    home: function () {
        this.render('home');
    }
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions