I have been thinking about this problem myself as my company has had a
crisis of faith with its current tech stack (GWT specifically), so I
appreciate where you are coming from.
Not based on anything except my understanding of how angular and DI works,
I would think that an angular app is very portable.
Mainly, because of two things:-
* Dependency injection (DI)
* Use of HTML
Angular has angularfied versions of jQuery ($jqLite) and the q library. As
these things are only really accessible via DI, your services and factories
can be used really easily without angular as you can just wire them up
manually. In fact, DI makes the $ stuff more portable, not less.
For example, if you have the following service (taken from the docs):-
var myService = function($q) { ... };
myModule.factory('myService', ['$q', myService]);
There is nothing "angular" about myService. You can pass in your own
version $q, which can be the version of the q library without worrying
about angular. You can even create versions of angular specific code, such
as $scope. The only JS which probably won't be portable are directives
(though, depending on the framework, you may be able to port those as well).
As for the angular HTML, it is just HTML (unlike Ember). Just as long as
you limit your custom HTML, your HTML should be portable to any other
framework. As Angular is HTML, CSS is unaffected. Also, assuming you use
JSON for your response, your server side code should remain unaffected.
One of the things I like about Angular is that it gives you all these tools
that make it easy for you to drop it (if you want).
Hope that helps.
Kamal.
On Tuesday, 21 January 2014 05:21:53 UTC+11, Raja Malik wrote:
>
> Hello All,
>
> Suppose we have an angular app and now some new and nice framework comes
> which I want to use for my app. What are the challenges I may face?
>
> I see that, the angular app can not be reused as is because there are lot
> of $* and ng-* in script and markup respectively.
>
> Thanks
> Raja
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.