Window resize fix using angular timeout