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

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

Open
siboyapati opened this issue Dec 16, 2014 · 2 comments
Open

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

siboyapati opened this issue Dec 16, 2014 · 2 comments

Comments

@siboyapati
Copy link

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');
    }
});
@siboyapati
Copy link
Author

@Multiply
Copy link
Owner

Is this working, without iron-router-progress?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants